]> The Tcpdump Group git mirrors - tcpdump/commitdiff
WB: Fix a bounds check
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 5 Dec 2017 18:21:23 +0000 (19:21 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 5 Dec 2017 18:21:23 +0000 (19:21 +0100)
print-wb.c

index 278e846d24623db4afb87867cbd9bb9e65e2920f..b2cd54ca1348eeaefb485a45b558faeb02b1b00c 100644 (file)
@@ -203,7 +203,7 @@ wb_id(netdissect_options *ndo,
        len -= sizeof(*io) * nid;
        io = (const struct id_off *)(id + 1);
        cp = (const char *)(io + nid);
-       if (ND_TTEST2(cp, len)) {
+       if (ND_TTEST2(*cp, len)) {
                ND_PRINT((ndo, "\""));
                fn_print(ndo, (const u_char *)cp, (const u_char *)cp + len);
                ND_PRINT((ndo, "\""));