mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
NSEC3: reject records with a zero length hash field
This commit is contained in:
@@ -212,7 +212,7 @@ fromwire_nsec3(ARGS_FROMWIRE) {
|
|||||||
hashlen = sr.base[0];
|
hashlen = sr.base[0];
|
||||||
isc_region_consume(&sr, 1);
|
isc_region_consume(&sr, 1);
|
||||||
|
|
||||||
if (sr.length < hashlen) {
|
if (hashlen < 1 || sr.length < hashlen) {
|
||||||
RETERR(DNS_R_FORMERR);
|
RETERR(DNS_R_FORMERR);
|
||||||
}
|
}
|
||||||
isc_region_consume(&sr, hashlen);
|
isc_region_consume(&sr, hashlen);
|
||||||
|
Reference in New Issue
Block a user