diff options
author | cturney <cturney@charter.net> | 2015-09-10 20:17:54 -0400 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2015-09-12 08:26:35 +0000 |
commit | fa9e473d08f38e7a2ac96f40ce2ca115f625e805 (patch) | |
tree | 98921843f43395882f410c767928186096a6c84d | |
parent | 10028a26cfbe935a6b5957929b58c4fb7ed45bc0 (diff) | |
download | wireshark-fa9e473d08f38e7a2ac96f40ce2ca115f625e805.tar.gz |
NFS file handle crc32_ccitt hashes are incorrect
tvb_get_string_enc() treats the FH as an an ASCII string and thus stops
reading at the first zero (0) it encounters.
Replace 'tvb_get_string_enc()' with 'tvb_memdup()' in dissect_fhandle_data().
Change-Id: Ifc30ec41590e9cab5666d0988fab1f66040ce0c7
Reviewed-on: https://code.wireshark.org/review/10493
Reviewed-by: Cal Turney <cturney@charter.net>
Reviewed-by: ronnie sahlberg <ronniesahlberg@gmail.com>
(cherry picked from commit 0a3d0c589fc7aa4d3b8cc5c588716fa7e09448a7)
Conflicts:
epan/dissectors/packet-nfs.c
Reviewed-on: https://code.wireshark.org/review/10498
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r-- | epan/dissectors/packet-nfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index 8df917de07..6d33dcb778 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -2371,7 +2371,7 @@ dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree * guint8 *fh_array; proto_item *fh_item = NULL; - fh_array = tvb_get_string(wmem_packet_scope(), tvb, offset, fhlen); + fh_array = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, offset, fhlen); fhhash = crc32_ccitt(fh_array, fhlen); if (hidden) { |