mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
dns_rdata_fromwire() only accepts input up to 2^16-1 octets.
This commit is contained in:
parent
e4d30cb007
commit
aa811801cb
@ -95,7 +95,11 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
unsigned int classes = (sizeof(classlist) / sizeof(classlist[0]));
|
||||
unsigned int types = 1, flags, t;
|
||||
|
||||
if (size < 2) {
|
||||
/*
|
||||
* First 2 bytes are used to select type and class.
|
||||
* dns_rdata_fromwire() only accepts input up to 2^16-1 octets.
|
||||
*/
|
||||
if (size < 2 || size > 0xffff + 2) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user