aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-06-14 13:59:36 -0400
committerJohn Thacker <johnthacker@gmail.com>2023-06-14 14:03:12 -0400
commit80489af0b5d65338e4d367b1ca48d2260454e669 (patch)
tree1f5d0fdd4c4180b3e006233e9ffb4eeeb1b63579
parent64a1436adde216e92d19f1eb5a09b5fd5b3270d9 (diff)
wlan: Don't access uninitalized memory here either
The src address also can be uninitialized. Companion to commit a39c9fc9b193bd63cbb0eb5af04395eb5cc743b9 Fix #19135
-rw-r--r--epan/dissectors/packet-ieee80211.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index e4692ff08b..d53118df7d 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -36360,7 +36360,11 @@ dissect_ieee80211_pv0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
} else {
memset(key.bssid, 0, 6);
}
- memcpy(key.src, whdr->src.data, 6);
+ if (whdr->src.type != AT_NONE) {
+ memcpy(key.src, whdr->src.data, 6);
+ } else {
+ memset(key.src, 0, 6);
+ }
key.seq_control = 0;
result = (retransmit_key *)g_hash_table_lookup(fc_analyse_retransmit_table, &key);
if (result && (result->seq_control == seq_control)) {