diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-04-21 18:12:58 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-04-21 18:12:58 +0200 |
commit | fa6e21e9393f814f9656460aeaa288dc543d6cec (patch) | |
tree | 53544d9b25c91e9a1ea417f966933180fe4efa01 /proto_80211_mac_hdr.c | |
parent | 679e6211238039322272e0d3d085fab0d7c5c91d (diff) |
dissectors: 80211_mac_hdr: Check return value of pkt_pull
Prevent a NULL pointer dereference if (for whatever reason) pkt_pull
returns NULL.
This issue was discovered using the Coverity scanner.
Fixes: 9278bb65 ("netsniff-ng: Dump basic radiotap header info")
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'proto_80211_mac_hdr.c')
-rw-r--r-- | proto_80211_mac_hdr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/proto_80211_mac_hdr.c b/proto_80211_mac_hdr.c index 0705eec..199c4e7 100644 --- a/proto_80211_mac_hdr.c +++ b/proto_80211_mac_hdr.c @@ -3154,6 +3154,8 @@ static void ieee80211(struct pkt_buff *pkt) rtap = (struct ieee80211_radiotap_header *)pkt_pull(pkt, sizeof(*rtap)); + if (rtap == NULL) + return; tprintf(" [ Radiotap "); tprintf("Version (%u), ", rtap->version); |