]> The Tcpdump Group git mirrors - tcpdump/commitdiff
SMB: Add two missing bounds checks
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 18 Dec 2017 12:01:43 +0000 (13:01 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 18 Dec 2017 12:01:43 +0000 (13:01 +0100)
print-smb.c

index 247b97f42027b46a6ea8ad6643906700f346b141..f691491340af751171eeca4e2526df473ba5760a 100644 (file)
@@ -945,7 +945,9 @@ nbt_tcp_print(netdissect_options *ndo,
     if (caplen < 4)
        goto trunc;
     maxbuf = data + caplen;
+    ND_TCHECK_1(data);
     type = EXTRACT_U_1(data);
+    ND_TCHECK_2(data + 2);
     nbt_len = EXTRACT_BE_U_2(data + 2);
     length -= 4;
     caplen -= 4;