Skip to content

Commit a0a1482

Browse files
committed
Limit the maximum length of a qname
1 parent dbedfc5 commit a0a1482

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pdns/dnsparser.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ void PacketReader::getLabelFromContent(const vector<uint8_t>& content, uint16_t&
470470
}
471471
ret.append(1,'.');
472472
}
473+
if (ret.length() > 1024)
474+
throw MOADNSException("Total name too long");
473475
}
474476
}
475477

0 commit comments

Comments
 (0)