1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 08:59:01 +00:00

Finer tests discovered and fixed other subtle bug thanks to them

This commit is contained in:
gio
2015-07-30 06:27:38 +00:00
parent 94e8a7acd3
commit 361f18fa87
2 changed files with 83 additions and 78 deletions

View File

@@ -1567,8 +1567,7 @@ size_t DNS::Answer::parseFromBuffer(const char * buf, size_t offset, size_t maxl
DNS_CHECK_ACCUMLATE(ret, tmp, Factory::parseUnsignedInt(ttl, buf, offset+ret, maxlen));
DNS_CHECK_ACCUMLATE(ret, tmp, Factory::parseUnsignedShort(length, buf, offset+ret, maxlen));
DNS_CHECK_UPPER_BOUND(offset+ret, maxlen);
length=buf[offset+ret];
DNS_CHECK_UPPER_BOUND(offset+ret+length, maxlen);
switch(record_type)
{