From 2bcfca7a468c3350ce9a28a9a18dce623a7645ee Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 21 Feb 2025 16:33:10 +0100 Subject: Some fixes and tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libterminput_marshal_text__.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libterminput_marshal_text__.c') diff --git a/libterminput_marshal_text__.c b/libterminput_marshal_text__.c index 264ec04..5fa1325 100644 --- a/libterminput_marshal_text__.c +++ b/libterminput_marshal_text__.c @@ -3,8 +3,10 @@ int -libterminput_marshal_text__(struct libterminput_marshaller *how, const struct libterminput_text *what) /* TODO test */ +libterminput_marshal_text__(struct libterminput_marshaller *how, const struct libterminput_text *what) { + if (what->nbytes > sizeof(what->bytes)) + abort(); if (how->store(how, &what->nbytes, sizeof(what->nbytes)) || how->store(how, what->bytes, what->nbytes)) return -1; -- cgit v1.2.3-70-g09d2