From d5ac77ee8b2008e3e401fff6cbe28ced3bdf69ba Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Thu, 19 Nov 2020 14:10:58 +0100 Subject: [PATCH] packet: set length of 0 for too big copy --- src/decode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/decode.c b/src/decode.c index 14506588b9..0c0ca72f1d 100644 --- a/src/decode.c +++ b/src/decode.c @@ -222,6 +222,7 @@ inline int PacketCopyDataOffset(Packet *p, uint32_t offset, const uint8_t *data, { if (unlikely(offset + datalen > MAX_PAYLOAD_SIZE)) { /* too big */ + SET_PKT_LEN(p, 0); return -1; } -- 2.47.2