]> The Tcpdump Group git mirrors - tcpdump/commitdiff
sFlow: add a length check for IPv4 matching the one for IPv6.
authorGuy Harris <[email protected]>
Sun, 17 Jul 2022 06:37:47 +0000 (23:37 -0700)
committerGuy Harris <[email protected]>
Sun, 17 Jul 2022 06:41:20 +0000 (23:41 -0700)
(backported from commit f378a729c372bad1c6e8663f20e8b092611dc074)

print-sflow.c

index 2cd00c0a06ab7852bc1c0a0d7209154dbaf7ad63..530219e122d77c06404c4c791327d427da23698c 100644 (file)
@@ -876,6 +876,7 @@ sflow_print(netdissect_options *ndo,
                len);
 
         /* skip Common header */
+        ND_LCHECK_ZU(tlen, sizeof(struct sflow_datagram_t));
         tptr += sizeof(struct sflow_datagram_t);
         tlen -= sizeof(struct sflow_datagram_t);
     } else {