Skip to content

Commit f64d00d

Browse files
committed
ext/sodium: signing empty messages is fine
1 parent bffe657 commit f64d00d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/sodium/libsodium.c

Lines changed: 1 addition & 1 deletion
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)