X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/2ba1be35231dbdad50729e544fe4c2252aa15008..4a390644ce4ae3ca88a511d28b418efe60bb71dc:/print-smb.c diff --git a/print-smb.c b/print-smb.c index 38a6a433..77d9f814 100644 --- a/print-smb.c +++ b/print-smb.c @@ -1237,7 +1237,7 @@ nbt_udp137_print(netdissect_options *ndo, } else { if (p >= maxbuf) goto out; - smb_data_print(ndo, p, min(rdlen, length - (p - data))); + smb_data_print(ndo, p, min(rdlen, length - ND_BYTES_BETWEEN(p, data))); p += rdlen; } }