try to fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9485
authormartink <martink@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 27 Nov 2013 21:52:44 +0000 (21:52 +0000)
committermartink <martink@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 27 Nov 2013 21:52:44 +0000 (21:52 +0000)
fc dissector rejects the packet if data parameter is empty

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@53617 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-fc.c

index c8694554aa3968302231260fabb9a8227894745f..a2b0faae188e89c04e7f58e28620faf15ed6c018 100644 (file)
@@ -1231,6 +1231,9 @@ dissect_fc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
 {
     fc_data_t* fc_data = (fc_data_t*)data;
 
+    if (!fc_data)
+       return 0;
+
     dissect_fc_helper (tvb, pinfo, tree, FALSE, fc_data);
     return tvb_length(tvb);
 }
@@ -1240,6 +1243,9 @@ dissect_fc_ifcp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
 {
     fc_data_t* fc_data = (fc_data_t*)data;
 
+    if (!fc_data)
+       return 0;
+
     dissect_fc_helper (tvb, pinfo, tree, TRUE, fc_data);
     return tvb_length(tvb);
 }