Successfully fails if data buffer is too small

This commit is contained in:
frekky 2015-10-27 17:28:20 +08:00
parent 91c095e063
commit 50c9cb28ec

View File

@ -206,7 +206,7 @@ window_reassemble_data(struct frag_buffer *w, uint8_t *data, size_t maxlen, int
} }
if (fraglen > maxlen) { if (fraglen > maxlen) {
WDEBUG("Data buffer too small! Reassembled %lu bytes.", datalen); WDEBUG("Data buffer too small! Reassembled %lu bytes.", datalen);
return datalen; return 0;
} }
/* Move window along to avoid weird issues */ /* Move window along to avoid weird issues */