aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-usb-ccid.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-09 22:23:44 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-09 22:23:44 +0000
commit79fa0d0a3fa8ebb91fac92fda1274957fc55bcd4 (patch)
tree9a714a0dfd512884ae08640817e2783d528d0bf3 /epan/dissectors/packet-usb-ccid.c
parente3c369eb6786e8f17e3e8ce6da027012511566b8 (diff)
Reject the packet if data is NULL without doing anything else.
Note: We *might* want to do _something_ but that _something_ should be well-defined and consistent across all dissectors. Previously, some dissectors called proto_tree_add_text() to add some error message text to the tree, while others called DISSECTOR_ASSERT(). svn path=/trunk/; revision=53895
Diffstat (limited to 'epan/dissectors/packet-usb-ccid.c')
-rw-r--r--epan/dissectors/packet-usb-ccid.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-usb-ccid.c b/epan/dissectors/packet-usb-ccid.c
index ce46a504ce..9431085afe 100644
--- a/epan/dissectors/packet-usb-ccid.c
+++ b/epan/dissectors/packet-usb-ccid.c
@@ -350,9 +350,12 @@ dissect_ccid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
proto_tree *ccid_tree;
guint8 cmd;
tvbuff_t *next_tvb;
- usb_conv_info_t *usb_conv_info = (usb_conv_info_t *)data;
+ usb_conv_info_t *usb_conv_info;
- DISSECTOR_ASSERT(usb_conv_info);
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ usb_conv_info = (usb_conv_info_t *)data;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "USBCCID");
col_set_str(pinfo->cinfo, COL_INFO, "CCID Packet");