- Fixed a NULL pointer dereference when processing invalid XML-RPC
requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)
+- Fixed 64-bit integer overflow in mhash_keygen_s2k(). (Clément LECIGNE, Stas)
- Fixed bug #51590 (JSON_ERROR_UTF8 is undefined). (Felipe)
- Fixed bug #51577 (Uninitialized memory reference with oci_bind_array_by_name)
Generates a key using hash functions */
PHP_FUNCTION(mhash_keygen_s2k)
{
- long algorithm, bytes;
+ long algorithm, l_bytes;
+ int bytes;
char *password, *salt;
int password_len, salt_len;
char padded_salt[SALT_SIZE];
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lssl", &algorithm, &password, &password_len, &salt, &salt_len, &bytes) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lssl", &algorithm, &password, &password_len, &salt, &salt_len, &l_bytes) == FAILURE) {
return;
}
+ bytes = (int)l_bytes;
if (bytes <= 0){
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the byte parameter must be greater than 0");
RETURN_FALSE;