From 0a3d0c589fc7aa4d3b8cc5c588716fa7e09448a7 Mon Sep 17 00:00:00 2001 From: cturney Date: Thu, 10 Sep 2015 20:17:54 -0400 Subject: [PATCH] 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 Reviewed-by: ronnie sahlberg --- epan/dissectors/packet-nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index fbfb4d4ae1..2ddbc039f3 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -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) {