1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Fixed possible stack overflow with special crafted input discovered by bonsaiviking with fuzzing

This commit is contained in:
gio
2015-07-30 06:27:41 +00:00
parent 361f18fa87
commit aec4aac98f

View File

@@ -1514,7 +1514,7 @@ size_t DNS::Factory::parseDomainName(std::string &name, const char *buf, size_t
u16 real_offset;
DNS_CHECK_ACCUMLATE(ret, tmp, parseUnsignedShort(real_offset, buf, offset+ret, maxlen));
real_offset -= COMPRESSED_NAME<<8;
if( real_offset < maxlen)
if( real_offset < offset)
{
std::string val;
DNS_CHECK_ACCUMLATE(tmp, tmp, parseDomainName(val, buf, real_offset, maxlen));