File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -19,4 +19,7 @@ PHP NEWS
19
19
- phpdbg:
20
20
. Fixed bug #76596 (phpdbg support for display_errors=stderr). (kabel)
21
21
22
+ - sodium:
23
+ . Fixed bug #77646 (sign_detached() strings not terminated). (jedisct1)
24
+
22
25
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
Original file line number Diff line number Diff line change @@ -1677,7 +1677,8 @@ PHP_FUNCTION(sodium_crypto_sign_detached)
1677
1677
zend_throw_exception (sodium_exception_ce , "signature has a bogus size" , 0 );
1678
1678
return ;
1679
1679
}
1680
- ZEND_ASSERT (ZSTR_VAL (signature )[signature_real_len ] == 0 );
1680
+ PHP_SODIUM_ZSTR_TRUNCATE (signature , (size_t ) signature_real_len );
1681
+ ZSTR_VAL (signature )[signature_real_len ] = 0 ;
1681
1682
1682
1683
RETURN_NEW_STR (signature );
1683
1684
}
You can’t perform that action at this time.
0 commit comments