Skip to content

Commit 47d7539

Browse files
committed
ext/sodium: avoid tautological comparisons
1 parent f64d00d commit 47d7539

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/sodium/libsodium.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,8 +1495,7 @@ PHP_FUNCTION(sodium_crypto_sign)
14951495
zend_throw_exception(sodium_exception_ce, "internal error", 0);
14961496
return;
14971497
}
1498-
if (msg_signed_real_len < 0U || msg_signed_real_len >= SIZE_MAX ||
1499-
msg_signed_real_len > msg_signed_len) {
1498+
if (msg_signed_real_len >= SIZE_MAX || msg_signed_real_len > msg_signed_len) {
15001499
zend_string_free(msg_signed);
15011500
zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0);
15021501
return;

0 commit comments

Comments
 (0)