From 50c9cb28ec027453b50f9affed8b344bd9587759 Mon Sep 17 00:00:00 2001 From: frekky Date: Tue, 27 Oct 2015 17:28:20 +0800 Subject: [PATCH] Successfully fails if data buffer is too small --- src/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.c b/src/window.c index 4cd6c6d..1e20d93 100644 --- a/src/window.c +++ b/src/window.c @@ -206,7 +206,7 @@ window_reassemble_data(struct frag_buffer *w, uint8_t *data, size_t maxlen, int } if (fraglen > maxlen) { WDEBUG("Data buffer too small! Reassembled %lu bytes.", datalen); - return datalen; + return 0; } /* Move window along to avoid weird issues */