diff options
author | jake <jake@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-11-03 17:52:11 +0000 |
---|---|---|
committer | jake <jake@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-11-03 17:52:11 +0000 |
commit | 17c22649c3e354a8e417d693efc66b0f93915b56 (patch) | |
tree | 1795848db75a354d8817c22e2bfbd1cb07ab7260 /epan/dissectors/packet-ieee802154.c | |
parent | f752f5d4b542b28f4a2d02360c613f86a31753d8 (diff) |
From Colin O'Flynn:
Add a missing NULL pointer check.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34761 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-ieee802154.c')
-rw-r--r-- | epan/dissectors/packet-ieee802154.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c index 463b17f1d8..000e92448d 100644 --- a/epan/dissectors/packet-ieee802154.c +++ b/epan/dissectors/packet-ieee802154.c @@ -820,8 +820,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g if ( ((packet->src_addr_mode == IEEE802154_FCF_ADDR_SHORT) || (packet->src_addr_mode == IEEE802154_FCF_ADDR_EXT)) && ((packet->dst_addr_mode == IEEE802154_FCF_ADDR_NONE) || (!packet->intra_pan)) ) { /* Source PAN is present, extract it and add it to the tree. */ - ieee_hints->src_pan = packet->src_pan = tvb_get_letohs(tvb, offset); - + packet->src_pan = tvb_get_letohs(tvb, offset); if (tree) { proto_tree_add_uint(ieee802154_tree, hf_ieee802154_src_panID, tvb, offset, 2, packet->src_pan); } @@ -829,7 +828,11 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g } else { /* Set the panID field in case the intra-pan condition was met. */ - ieee_hints->src_pan = packet->src_pan = packet->dst_pan; + packet->src_pan = packet->dst_pan; + } + + if (ieee_hints) { + ieee_hints->src_pan = packet->src_pan; } /* Get short source address if present. */ |