1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

dns: parser reads into garbage on misreported packet size (#468)

Co-authored-by: Bill Willcox <billwcorp@gmail.com>
This commit is contained in:
Bill Willcox
2022-02-26 17:29:22 -05:00
committed by GitHub
parent c302e659d7
commit 7204fbd688
3 changed files with 64 additions and 6 deletions

View File

@@ -1034,7 +1034,8 @@ private:
uint32_t compose_name(const uint8_t* ptr, char* out_ptr) const;
void convert_records(const uint8_t* ptr,
const uint8_t* end,
resources_type& res) const;
resources_type& res,
const uint16_t rr_count) const;
void skip_to_section_end(Memory::InputMemoryStream& stream,
const uint32_t num_records) const;
void skip_to_dname_end(Memory::InputMemoryStream& stream) const;