aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pcnfsd.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-04-22 17:42:47 +0000
committerGerald Combs <gerald@wireshark.org>2009-04-22 17:42:47 +0000
commit180852ed7c715630c9c413cc51af104583bc4e3b (patch)
tree64c2796dc8558daa935a849657352fec9ff06441 /epan/dissectors/packet-pcnfsd.c
parent1913c70d1a1231cbfdc8fa002fc311be12b72c7c (diff)
From Mark Cave-Ayland: Fix a crash in the PCNFSD dissector.
From me: Apply Mark's fix to the ident string. Add public #defines for the special strings that dissect_rpc_* might return and use them in PCNFSD. Replace a manual buffer allocation with ep_strdup_printf. svn path=/trunk/; revision=28128
Diffstat (limited to 'epan/dissectors/packet-pcnfsd.c')
-rw-r--r--epan/dissectors/packet-pcnfsd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/dissectors/packet-pcnfsd.c b/epan/dissectors/packet-pcnfsd.c
index c2289e1002..2c491e5f5c 100644
--- a/epan/dissectors/packet-pcnfsd.c
+++ b/epan/dissectors/packet-pcnfsd.c
@@ -211,7 +211,10 @@ dissect_pcnfsd2_auth_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
if (ident) {
- pcnfsd_decode_obscure(ident, (int)strlen(ident));
+ /* Only attempt to decode the ident if it has been specified */
+ if (strcmp(ident, RPC_STRING_EMPTY))
+ pcnfsd_decode_obscure(ident, (int)strlen(ident));
+
if (ident_tree)
proto_tree_add_string(ident_tree,
hf_pcnfsd_auth_ident_clear,
@@ -238,7 +241,10 @@ dissect_pcnfsd2_auth_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
if (password) {
- pcnfsd_decode_obscure(password, (int)strlen(password));
+ /* Only attempt to decode the password if it has been specified */
+ if (strcmp(password, RPC_STRING_EMPTY))
+ pcnfsd_decode_obscure(password, (int)strlen(password));
+
if (password_tree)
proto_tree_add_string(password_tree,
hf_pcnfsd_auth_password_clear,