X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/7b2c5a11a7bc236d72b440c4db5263edb23b4880..3d6e7bd1e42a7316fb2020348a8d3e86b1346b36:/smbutil.c diff --git a/smbutil.c b/smbutil.c index 06354fb4..fc9b3cc6 100644 --- a/smbutil.c +++ b/smbutil.c @@ -10,13 +10,13 @@ #include "config.h" #endif -#include +#include #include #include #include -#include "interface.h" +#include "netdissect.h" #include "extract.h" #include "smb.h" @@ -237,6 +237,7 @@ name_len(netdissect_options *ndo, return(-1); /* name goes past the end of the buffer */ ND_TCHECK2(*s, 1); s += (*s) + 1; + ND_TCHECK2(*s, 1); } return(PTR_DIFF(s, s0) + 1); @@ -271,8 +272,7 @@ name_type_str(int name_type) } void -print_data(netdissect_options *ndo, - const unsigned char *buf, int len) +smb_print_data(netdissect_options *ndo, const unsigned char *buf, int len) { int i = 0; @@ -860,7 +860,7 @@ smb_fdata(netdissect_options *ndo, if (!depth && buf < maxbuf) { size_t len = PTR_DIFF(maxbuf, buf); ND_PRINT((ndo, "Data: (%lu bytes)\n", (unsigned long)len)); - print_data(ndo, buf, len); + smb_print_data(ndo, buf, len); return(buf + len); } return(buf);