about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMarc <marc@malloc.me>2022-09-10 21:24:59 +0100
committerMarc <marc@malloc.me>2022-09-10 21:24:59 +0100
commit91db28425f34c11e0b2a0537f76c8511d239d27a (patch)
tree3cc24531302942dcf75baa6120642d1f2d71aebe /src
parent20898787fc8eb98cac50ddeb68a6a44f6769a064 (diff)
downloadlibwifi-91db28425f34c11e0b2a0537f76c8511d239d27a.tar.gz
libwifi-91db28425f34c11e0b2a0537f76c8511d239d27a.tar.bz2
libwifi-91db28425f34c11e0b2a0537f76c8511d239d27a.zip
parse: Add clarifying comment for Beacon frame length check
Diffstat (limited to 'src')
-rw-r--r--src/libwifi/parse/management/beacon.c1
1 files changed, 1 insertions, 0 deletions
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) {
61 } 61 }
62 62
63 // At least one Tagged Parameter must be present 63 // At least one Tagged Parameter must be present
64 // + 2 represents two additional bytes: Tag number and a single byte value
64 if (frame->len < (frame->header_len + sizeof(struct libwifi_beacon_fixed_parameters) + 2)) { 65 if (frame->len < (frame->header_len + sizeof(struct libwifi_beacon_fixed_parameters) + 2)) {
65 return -EINVAL; 66 return -EINVAL;
66 } 67 }