diff options
| author | Marc <marc@malloc.me> | 2022-09-10 21:24:59 +0100 |
|---|---|---|
| committer | Marc <marc@malloc.me> | 2022-09-10 21:24:59 +0100 |
| commit | 91db28425f34c11e0b2a0537f76c8511d239d27a (patch) | |
| tree | 3cc24531302942dcf75baa6120642d1f2d71aebe /src/libwifi | |
| parent | 20898787fc8eb98cac50ddeb68a6a44f6769a064 (diff) | |
| download | libwifi-91db28425f34c11e0b2a0537f76c8511d239d27a.tar.gz libwifi-91db28425f34c11e0b2a0537f76c8511d239d27a.tar.bz2 libwifi-91db28425f34c11e0b2a0537f76c8511d239d27a.zip | |
parse: Add clarifying comment for Beacon frame length check
Diffstat (limited to 'src/libwifi')
| -rw-r--r-- | src/libwifi/parse/management/beacon.c | 1 |
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 | } |
