com php-src: ext/sodium: signing empty messages is fine: ext/sodium/libsodium.c
| From: | Frank Denis | Date: | Tue, 26 Sep 2017 15:37:04 +0000 |
| Subject: | com php-src: ext/sodium: signing empty messages is fine: ext/sodium/libsodium.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99547@lists.php.net to get a copy of this message | ||
Commit: f64d00d684f611806ab348480772f11bae27b78f
Author: Frank Denis <github@pureftpd.org> Tue, 26 Sep 2017 17:37:04 +0200
Parents: bffe657d94ac7065aeacef7460fff2caa243ffa0
Branches: PHP-7.2
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f64d00d684f611806ab348480772f11bae27b78f
Log:
ext/sodium: signing empty messages is fine
Changed paths:
M ext/sodium/libsodium.c
Diff:
diff --git a/ext/sodium/libsodium.c b/ext/sodium/libsodium.c
index 8d02af5...65ee8f8 100644
--- a/ext/sodium/libsodium.c
+++ b/ext/sodium/libsodium..c
@@ -1495,7 +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 ||
+ if (msg_signed_real_len < 0U || 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);