1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-25 19:51:34 +01:00

Make RadioTapParser::skip_to_field check for end of buffer (#296)

Fixes #295
This commit is contained in:
Matias Fontanini
2018-05-16 12:30:16 -07:00
committed by GitHub
parent b18c2cefec
commit 5571a270d4
2 changed files with 57 additions and 2 deletions

View File

@@ -233,7 +233,7 @@ bool RadioTapParser::skip_to_field(RadioTap::PresentFlags flag) {
}
bool RadioTapParser::has_fields() const {
return current_bit_ != MAX_RADIOTAP_FIELD;
return current_bit_ != MAX_RADIOTAP_FIELD && current_ptr_ < end_;
}
bool RadioTapParser::has_field(RadioTap::PresentFlags flag) const {