From 47d75394c9c1baedfffb79201ee7750e74171a31 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 26 Sep 2017 17:58:16 +0200 Subject: [PATCH] ext/sodium: avoid tautological comparisons --- ext/sodium/libsodium.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/sodium/libsodium.c b/ext/sodium/libsodium.c index 65ee8f84e1..6f8b6e80f3 100644 --- a/ext/sodium/libsodium.c +++ b/ext/sodium/libsodium.c @@ -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; -- 2.40.0