2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

NSEC3: reject records with a zero length hash field

This commit is contained in:
Mark Andrews 2020-08-13 12:46:55 +10:00
parent d7f7014803
commit 031ee9e279

View File

@ -212,7 +212,7 @@ fromwire_nsec3(ARGS_FROMWIRE) {
hashlen = sr.base[0];
isc_region_consume(&sr, 1);
if (sr.length < hashlen) {
if (hashlen < 1 || sr.length < hashlen) {
RETERR(DNS_R_FORMERR);
}
isc_region_consume(&sr, hashlen);