diff options
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; |