The parsing loop needs to process ISC_R_NOSPACE to properly
size the buffer. If result is still ISC_R_NOSPACE at the end
of the parsing loop set result to DNS_R_SERVFAIL.
(cherry picked from commit
08f1cba096243cd14041731b7ea1ad45e54e87b0)
mctx, rdatabuf, &lookup->callbacks);
if (result != ISC_R_SUCCESS) {
isc_buffer_free(&rdatabuf);
- result = DNS_R_SERVFAIL;
}
if (size >= 65535) {
break;
} while (result == ISC_R_NOSPACE);
if (result != ISC_R_SUCCESS) {
+ result = DNS_R_SERVFAIL;
goto failure;
}