]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix comparison between signed and unsigned integer expressions
authorOndřej Surý <ondrej@sury.org>
Thu, 4 Mar 2021 09:47:56 +0000 (10:47 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 4 Mar 2021 10:21:43 +0000 (11:21 +0100)
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.

lib/isc/netmgr/http.c

index b90abce05c7f2053fcba27af5ae1667b0bead031..51adbea6f6888720c09d9a48779ef7257217eb48 100644 (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);