]> The Tcpdump Group git mirrors - tcpdump/commitdiff
sFlow: Add a length check
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 3 Nov 2021 09:18:24 +0000 (10:18 +0100)
committerGuy Harris <[email protected]>
Sun, 17 Jul 2022 03:08:17 +0000 (20:08 -0700)
(cherry picked from commit 64a5c6c907a35df6bcf5db73801da2eeff5c05f5)

print-sflow.c

index 71ca26630ab56067148093aff74b81b17020821c..2cd00c0a06ab7852bc1c0a0d7209154dbaf7ad63 100644 (file)
@@ -891,6 +891,7 @@ sflow_print(netdissect_options *ndo,
                len);
 
         /* skip Common header */
+        ND_LCHECK_ZU(tlen, sizeof(struct sflow_v6_datagram_t));
         tptr += sizeof(struct sflow_v6_datagram_t);
         tlen -= sizeof(struct sflow_v6_datagram_t);
     }