com php-src: Merge branch 'PHP-5.6' into PHP-7.0: ext/mcrypt/mcrypt.c

From: Date: Sat, 08 Oct 2016 17:25:36 +0000
Subject: com php-src: Merge branch 'PHP-5.6' into PHP-7.0: ext/mcrypt/mcrypt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94871@lists.php.net to get a copy of this message
Commit: 6f84ac721b2674dc056430c420c839f4d2fe5b74 Author: Anatol Belski <ab@php.net> Sat, 8 Oct 2016 19:25:36 +0200 Parents: 2a75f5026a47099f585e29c5a9d8a2989dab42af 3c5742ebd735d03468048edbca434769dffec8f4 Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6f84ac721b2674dc056430c420c839f4d2fe5b74 Log: Merge branch 'PHP-5.6' into PHP-7.0 * PHP-5.6: fix leak Changed paths: MM ext/mcrypt/mcrypt.c Diff: diff --cc ext/mcrypt/mcrypt.c index 9865cbb,66382ae..e7bdd43 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@@ -1298,8 -1309,9 +1298,9 @@@ static void php_mcrypt_do_crypt(char* c memcpy(data_s, data, data_len); } - if (mcrypt_generic_init(td, (void *) key, key_len, (void *) iv) < 0) { + if (mcrypt_generic_init(td, (void *) key, (int)key_len, (void *) iv) < 0) { + efree(data_s); - php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Mcrypt initialisation failed"); + php_error_docref(NULL, E_RECOVERABLE_ERROR, "Mcrypt initialisation failed"); mcrypt_module_close(td); RETURN_FALSE; }

« previous php.cvs (#94871) next »