aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nfs.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2010-07-20 17:16:42 +0000
committerGerald Combs <gerald@wireshark.org>2010-07-20 17:16:42 +0000
commit46bd1dac986623a884ddd93191b3a5e7ef75137a (patch)
tree81306f2f6ff678760a4d0e209e9c7e2606ddfe12 /epan/dissectors/packet-nfs.c
parentf3dab52b93123008ddaad6ff1f3e29382cf66559 (diff)
Initialize a variable. Fixes bug 5026.
svn path=/trunk/; revision=33596
Diffstat (limited to 'epan/dissectors/packet-nfs.c')
-rw-r--r--epan/dissectors/packet-nfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
index e6c18cb671..451b0cb206 100644
--- a/epan/dissectors/packet-nfs.c
+++ b/epan/dissectors/packet-nfs.c
@@ -8909,7 +8909,7 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *newftree = NULL;
guint32 string_length;
int cbprog;
- char *name, *source_name, *dest_name=NULL;
+ char *name = NULL, *source_name = NULL, *dest_name=NULL;
const char *opname=NULL;
guint32 last_fh_hash=0;
guint32 saved_fh_hash=0;
@@ -9232,7 +9232,9 @@ dissect_nfs_argop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
hf_nfs_component4, &source_name);
offset = dissect_nfs_utf8string(tvb, offset, newftree,
hf_nfs_component4, &dest_name);
- g_string_append_printf (op_summary[ops_counter].optext, " From: %s To: %s", source_name, dest_name);
+ g_string_append_printf (op_summary[ops_counter].optext, " From: %s To: %s",
+ source_name ? source_name : "Unknown",
+ dest_name ? dest_name : "Unknown");
break;
case NFS4_OP_RENEW: