]> granicus.if.org Git - php/commitdiff
ext/sodium: avoid tautological comparisons
authorFrank Denis <github@pureftpd.org>
Tue, 26 Sep 2017 15:58:16 +0000 (17:58 +0200)
committerFrank Denis <github@pureftpd.org>
Tue, 26 Sep 2017 15:58:16 +0000 (17:58 +0200)
ext/sodium/libsodium.c

index 65ee8f84e15dd024c8fbe16737b4dd08cf1701e5..6f8b6e80f30cf5b09afed7486f3e474e8d3ebb7c 100644 (file)
@@ -1495,8 +1495,7 @@ PHP_FUNCTION(sodium_crypto_sign)
                zend_throw_exception(sodium_exception_ce, "internal error", 0);
                return;
        }
-       if (msg_signed_real_len < 0U || msg_signed_real_len >= SIZE_MAX ||
-               msg_signed_real_len > msg_signed_len) {
+       if (msg_signed_real_len >= SIZE_MAX || msg_signed_real_len > msg_signed_len) {
                zend_string_free(msg_signed);
                zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0);
                return;