From: Philippe Antoine Date: Thu, 19 Nov 2020 13:10:58 +0000 (+0100) Subject: packet: set length of 0 for too big copy X-Git-Tag: suricata-6.0.1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5ac77ee8b2008e3e401fff6cbe28ced3bdf69ba;p=thirdparty%2Fsuricata.git packet: set length of 0 for too big copy --- 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; }