X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/577621026df8d4a33a34d4e125f9ec964fc0e53c..e534e38f78ca28e849fd91eba2a962347b049faf:/smbutil.c diff --git a/smbutil.c b/smbutil.c index 71ad60d9..d18a140f 100644 --- a/smbutil.c +++ b/smbutil.c @@ -133,7 +133,8 @@ name_interpret(netdissect_options *ndo, if (in >= maxbuf) return(-1); /* name goes past the end of the buffer */ ND_TCHECK2(*in, 1); - len = (*in++) / 2; + len = EXTRACT_8BITS(in) / 2; + in++; *out=0; @@ -684,8 +685,10 @@ smb_fdata1(netdissect_options *ndo, { int l = atoi(fmt + 1); ND_TCHECK2(*buf, l); - while (l--) - ND_PRINT((ndo, "%02x", *buf++)); + while (l--) { + ND_PRINT((ndo, "%02x", EXTRACT_8BITS(buf))); + buf++; + } fmt++; while (isdigit((unsigned char)*fmt)) fmt++;