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 @@ -74,6 +74,9 @@ PHP NEWS
74
74
- Sockets:
75
75
. Fixed bug #67619 (Validate length on socket_write). (thiagooak)
76
76
77
+ - sodium:
78
+ . Fixed bug #77646 (sign_detached() strings not terminated). (jedisct1)
79
+
77
80
- SQLite3:
78
81
. Unbundled libsqlite. (cmb)
79
82
. Raised requirements to SQLite 3.7.4. (cmb)
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