2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Ensure base64/base32/hex fields in DNS records that should be non-empty are.

This commit is contained in:
Mark Andrews
2019-01-04 15:20:04 +11:00
parent 5114270fa7
commit 5e8b772ad1
26 changed files with 135 additions and 70 deletions

View File

@@ -868,13 +868,16 @@ unknown_fromtext(dns_rdataclass_t rdclass, dns_rdatatype_t type,
if (result != ISC_R_SUCCESS)
return (result);
result = isc_hex_tobuffer(lexer, buf,
(unsigned int)token.value.as_ulong);
if (result != ISC_R_SUCCESS)
goto failure;
if (isc_buffer_usedlength(buf) != token.value.as_ulong) {
result = ISC_R_UNEXPECTEDEND;
goto failure;
if (token.value.as_ulong != 0U) {
result = isc_hex_tobuffer(lexer, buf,
(unsigned int)token.value.as_ulong);
if (result != ISC_R_SUCCESS) {
goto failure;
}
if (isc_buffer_usedlength(buf) != token.value.as_ulong) {
result = ISC_R_UNEXPECTEDEND;
goto failure;
}
}
if (dns_rdatatype_isknown(type)) {