Skip to content

Commit cb39422

Browse files
committed
Merge branch 'PHP-7.2'
* PHP-7.2: ext/sodium: signing empty messages is fine
2 parents 5b849d9 + f64d00d commit cb39422

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/sodium/libsodium.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1495,7 +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 ||
1498+
if (msg_signed_real_len < 0U || msg_signed_real_len >= SIZE_MAX ||
14991499
msg_signed_real_len > msg_signed_len) {
15001500
zend_string_free(msg_signed);
15011501
zend_throw_exception(sodium_exception_ce, "arithmetic overflow", 0);

0 commit comments

Comments
 (0)