diff options
Diffstat (limited to 'epan/dissectors/packet-zbee-zcl-se.c')
-rw-r--r-- | epan/dissectors/packet-zbee-zcl-se.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/dissectors/packet-zbee-zcl-se.c b/epan/dissectors/packet-zbee-zcl-se.c index 3d12e441f8..a763d5652e 100644 --- a/epan/dissectors/packet-zbee-zcl-se.c +++ b/epan/dissectors/packet-zbee-zcl-se.c @@ -167,11 +167,17 @@ dissect_zbee_zcl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* { proto_item *payload_root; proto_tree *payload_tree; - zbee_zcl_packet *zcl = (zbee_zcl_packet *)data; + zbee_zcl_packet *zcl; guint offset = 0; - guint8 cmd_id = zcl->cmd_id; + guint8 cmd_id; gint rem_len; + /* Reject the packet if data is NULL */ + if (data == NULL) + return 0; + zcl = (zbee_zcl_packet *)data; + cmd_id = zcl->cmd_id; + /* Create a subtree for the ZCL Command frame, and add the command ID to it. */ if (zcl->direction == ZBEE_ZCL_FCF_TO_SERVER) { /* Append the command name to the info column. */ |