aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-04-25 12:13:01 +0200
committerPeter Wu <peter@lekensteyn.nl>2017-04-25 13:51:52 +0000
commitbfd1461ec81311f31e9fc0f3f298ae779911c7f4 (patch)
tree570907729c4b5aa3d7a9f8dc883e9e4eeb54cce9 /epan
parent907d05da84f97b893887416d453a540a793c9ec5 (diff)
ieee80211: fix stack-use-after-return
Bug: 13662 Change-Id: I26c53ecc78005b26908d74877814be22924848bc Fixes: v1.11.3-rc1-2029-g4b8b83407a ("Support for IEEE 802.11ad") Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1268 Reviewed-on: https://code.wireshark.org/review/21333 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-ieee80211.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 5347845f02..1c14c81cc0 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -14336,9 +14336,8 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
ieee80211_tagged_field_data_t field_data;
gboolean isDMG;
- gboolean *p_isDMG = ((gboolean*)(p_get_proto_data(wmem_file_scope(), pinfo, proto_wlan, IS_DMG_KEY)));
+ isDMG = GPOINTER_TO_INT(p_get_proto_data(wmem_file_scope(), pinfo, proto_wlan, IS_DMG_KEY));
- isDMG = p_isDMG ? *p_isDMG : FALSE;
tag_no = tvb_get_guint8(tvb, offset);
tag_len = tvb_get_guint8(tvb, offset + 1);
@@ -17169,7 +17168,7 @@ dissect_ieee80211_common(tvbuff_t *tvb, packet_info *pinfo,
AIRPDCAP_KEY_ITEM used_key;
- p_add_proto_data(wmem_file_scope(), pinfo, proto_wlan, IS_DMG_KEY, &isDMG);
+ p_add_proto_data(wmem_file_scope(), pinfo, proto_wlan, IS_DMG_KEY, GINT_TO_POINTER(isDMG));
whdr= &whdrs[0];