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

Fix comparison between signed and unsigned integer expressions

Simple typecast to size_t should be enough to silence the warning on
ARMv7, even though the code is in fact correct, because the readlen is
checked for being < 0 in the block before the warning.
This commit is contained in:
Ondřej Surý
2021-03-04 10:47:56 +01:00
committed by Ondřej Surý
parent 2c9c16e334
commit d3bb3ae64f

View File

@@ -704,7 +704,7 @@ https_readcb(isc_nmhandle_t *handle, isc_result_t result, isc_region_t *region,
return;
}
if (readlen < region->length) {
if ((size_t)readlen < region->length) {
INSIST(session->bufsize == 0);
INSIST(region->length - readlen < MAX_DNS_MESSAGE_SIZE);
memmove(session->buf, region->base, region->length - readlen);