]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Cast to unsigned before comparison for assertion.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 19 Nov 2019 14:26:57 +0000 (15:26 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 19 Nov 2019 14:26:57 +0000 (15:26 +0100)
smallapp/unbound-anchor.c

index c8258f130bd0d763fd7b5eca11370e310a40b993..b8bd1b850c1a02f7ec83b1b8240d817dd80bd4dd 100644 (file)
@@ -943,7 +943,7 @@ read_data_chunk(SSL* ssl, size_t len)
        size_t got = 0;
        int r;
        char* data;
-       if(len >= (size_t)0xfffffff0)
+       if((unsigned)len >= (unsigned)0xfffffff0)
                return NULL; /* to protect against integer overflow in malloc*/
        data = malloc(len+1);
        if(!data) {