diff options
author | Mattias Andrée <m@maandree.se> | 2025-02-21 16:33:10 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-02-21 16:33:10 +0100 |
commit | 2bcfca7a468c3350ce9a28a9a18dce623a7645ee (patch) | |
tree | 5d7b8a1c0508fe49661be405416c3b421cad2925 /libterminput_marshal_text__.c | |
parent | Update readme (diff) | |
download | libterminput-2bcfca7a468c3350ce9a28a9a18dce623a7645ee.tar.gz libterminput-2bcfca7a468c3350ce9a28a9a18dce623a7645ee.tar.bz2 libterminput-2bcfca7a468c3350ce9a28a9a18dce623a7645ee.tar.xz |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libterminput_marshal_text__.c')
-rw-r--r-- | libterminput_marshal_text__.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |