]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
packet: set length of 0 for too big copy
authorPhilippe Antoine <contact@catenacyber.fr>
Thu, 19 Nov 2020 13:10:58 +0000 (14:10 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 3 Dec 2020 12:00:42 +0000 (13:00 +0100)
src/decode.c

index 14506588b98f16071e233367c288481ac36a3d67..0c0ca72f1d493b08a49d476c102e0261544be2f7 100644 (file)
@@ -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;
     }