mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Correct option upper bound testing.
This commit is contained in:
@@ -54,7 +54,7 @@ RadioTapWriter::RadioTapWriter(vector<uint8_t>& buffer)
|
||||
|
||||
void RadioTapWriter::write_option(const RadioTap::option& option) {
|
||||
const uint32_t bit = get_bit(option.option());
|
||||
if (bit > RadioTapParser::MAX_RADIOTAP_FIELD) {
|
||||
if (bit >= RadioTapParser::MAX_RADIOTAP_FIELD) {
|
||||
throw malformed_option();
|
||||
}
|
||||
const bool is_empty = buffer_.empty();
|
||||
|
||||
Reference in New Issue
Block a user