X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/99c91c3aec40b691641374f58e798bd8d6b657bd..e01c9bf76740802025c9328901b55ee4a0c49ed6:/smbutil.c diff --git a/smbutil.c b/smbutil.c index 8e5e5087..fc9b3cc6 100644 --- a/smbutil.c +++ b/smbutil.c @@ -16,7 +16,7 @@ #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);