diff --git a/bin/dig/host.c b/bin/dig/host.c index 011587a5a6..57c1fb492d 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -185,6 +185,7 @@ retry: result = dns_rdata_totext(rdata, NULL, b); if (result == ISC_R_NOSPACE) { isc_buffer_free(&b); + INSIST(bufsize <= (UINT_MAX / 2)); bufsize *= 2; goto retry; } diff --git a/bin/dig/nslookup.c b/bin/dig/nslookup.c index a0f508d75a..d8e7537255 100644 --- a/bin/dig/nslookup.c +++ b/bin/dig/nslookup.c @@ -204,6 +204,7 @@ printrdata(dns_rdata_t *rdata) { check_result(result, "dns_rdata_totext"); } isc_buffer_free(&b); + INSIST(size <= (UINT_MAX / 2)); size *= 2; } }