diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-12-16 00:34:12 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-12-16 00:34:12 -0800 |
commit | e18798ad05c4b2b34e518a6e68df20e185ddb222 (patch) | |
tree | ba0188adc1c95148138f868917a4073d2c39e9d8 /print-nfs.c | |
parent | eb58492d87b865007e2c5df82069e88819c552b3 (diff) | |
download | tcpdump-e18798ad05c4b2b34e518a6e68df20e185ddb222.tar.gz |
Use EXTRACT_BE_U_4() to fetch a 4-byte big-endian value from a packet.
Diffstat (limited to 'print-nfs.c')
-rw-r--r-- | print-nfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/print-nfs.c b/print-nfs.c index 45b42787..4d657c01 100644 --- a/print-nfs.c +++ b/print-nfs.c @@ -480,9 +480,9 @@ parsefn(netdissect_options *ndo, /* Bail if we don't have the string length */ ND_TCHECK(*dp); - /* Fetch string length; convert to host order */ - len = *dp++; - NTOHL(len); + /* Fetch big-endian string length */ + len = EXTRACT_BE_U_4(dp); + dp++; ND_TCHECK_LEN(dp, ((len + 3) & ~3)); |