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>
This commit is contained in:
cturney 2015-09-10 20:17:54 -04:00 committed by ronnie sahlberg
parent 46b50b4698
commit 0a3d0c589f
1 changed files with 1 additions and 1 deletions

View File

@ -2194,7 +2194,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_enc(wmem_packet_scope(), tvb, offset, fhlen, ENC_ASCII);
fh_array = tvb_memdup(wmem_packet_scope(), tvb, offset, fhlen);
fhhash = crc32_ccitt(fh_array, fhlen);
if (hidden) {