]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Do more length checking. From OpenBSD.
authorGuy Harris <[email protected]>
Thu, 18 Dec 2014 22:48:08 +0000 (14:48 -0800)
committerGuy Harris <[email protected]>
Thu, 18 Dec 2014 22:48:08 +0000 (14:48 -0800)
print-sl.c

index fb6a59ceb586992318d18af3762d1d0a665994df..bd410ce21a28ff49e0128c4022645cae73e5fa07 100644 (file)
@@ -62,7 +62,7 @@ sl_if_print(netdissect_options *ndo,
        register u_int length = h->len;
        register const struct ip *ip;
 
-       if (caplen < SLIP_HDRLEN) {
+       if (caplen < SLIP_HDRLEN || length < SLIP_HDRLEN) {
                ND_PRINT((ndo, "%s", tstr));
                return (caplen);
        }