NSEC3PARAM: check that saltlen is consistent with the rdata length

This commit is contained in:
Mark Andrews 2020-08-13 13:21:46 +10:00
parent 031ee9e279
commit 7dc8e720ff

View file

@ -160,7 +160,7 @@ fromwire_nsec3param(ARGS_FROMWIRE) {
saltlen = sr.base[4];
isc_region_consume(&sr, 5);
if (sr.length < saltlen) {
if (sr.length != saltlen) {
RETERR(DNS_R_FORMERR);
}
isc_region_consume(&sr, saltlen);