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>
This commit is contained in:
Peter Wu 2017-04-25 12:13:01 +02:00
parent 907d05da84
commit bfd1461ec8
1 changed files with 2 additions and 3 deletions

View File

@ -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];