WKS: reject records with zero octets at the end of the bitmap

This commit is contained in:
Mark Andrews 2020-08-13 13:33:32 +10:00
parent 3429c35f52
commit 9d446142d8

View file

@ -268,6 +268,9 @@ fromwire_in_wks(ARGS_FROMWIRE) {
if (sr.length > 8 * 1024 + 5) {
return (DNS_R_EXTRADATA);
}
if (sr.length > 5 && sr.base[sr.length - 1] == 0) {
return (DNS_R_FORMERR);
}
if (tr.length < sr.length) {
return (ISC_R_NOSPACE);
}