From 91db28425f34c11e0b2a0537f76c8511d239d27a Mon Sep 17 00:00:00 2001 From: Marc Date: Sat, 10 Sep 2022 21:24:59 +0100 Subject: parse: Add clarifying comment for Beacon frame length check --- src/libwifi/parse/management/beacon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libwifi/parse/management/beacon.c b/src/libwifi/parse/management/beacon.c index 72246af..3d2feba 100644 --- a/src/libwifi/parse/management/beacon.c +++ b/src/libwifi/parse/management/beacon.c @@ -61,6 +61,7 @@ int libwifi_parse_beacon(struct libwifi_bss *bss, struct libwifi_frame *frame) { } // At least one Tagged Parameter must be present + // + 2 represents two additional bytes: Tag number and a single byte value if (frame->len < (frame->header_len + sizeof(struct libwifi_beacon_fixed_parameters) + 2)) { return -EINVAL; } -- cgit 1.4.1