diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-10-12 15:00:07 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-10-12 15:00:07 +0000 |
commit | 5e7147a6dd042cd130f617b13bff0d9e6e4d6da6 (patch) | |
tree | eb7160874f3455b5fbe7602fae013c1603835cec /epan/dissectors/packet-ndps.c | |
parent | 1b82f18b0161d1b5c34f7d48d748d19c0e587aea (diff) |
Check to see if we've passed a null strval to ndps_string().
Should fix the recent fuzz bugs.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19506 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-ndps.c')
-rw-r--r-- | epan/dissectors/packet-ndps.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c index 165010e38f..e6c76cd077 100644 --- a/epan/dissectors/packet-ndps.c +++ b/epan/dissectors/packet-ndps.c @@ -2023,7 +2023,8 @@ ndps_string(tvbuff_t* tvb, int hfinfo, proto_tree *ndps_tree, int offset, char * if(str_length == 0) { proto_tree_add_string(ndps_tree, hfinfo, tvb, offset, 4, "<Not Specified>"); - *stringval = ep_strdup(""); + if (stringval != NULL) + *stringval = ep_strdup(""); return foffset; } if (str_length <= 2 || (str_length & 0x01) || tvb_get_guint8(tvb, foffset + 1) != 0) { |