[php-src] master: Fix a non-exploitable integer overflow in mhash_keygen_s2k (#23770)

From: Date: Sat, 19 Sep 2026 17:11:01 +0000
Subject: [php-src] master: Fix a non-exploitable integer overflow in mhash_keygen_s2k (#23770)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-141285@lists.php.net to get a copy of this message
Author: Julien Voisin (jvoisin) Committer: GitHub (web-flow) Pusher: ndossche Date: 2026-09-19T19:10:58+02:00 Commit: https://github.com/php/php-src/commit/5e021664d84465d9b020bacd257fc407697b408f Raw diff: https://github.com/php/php-src/commit/5e021664d84465d9b020bacd257fc407697b408f.diff Fix a non-exploitable integer overflow in mhash_keygen_s2k (#23770) Changed paths: M ext/hash/hash.c Diff: diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 4a0b0c49437e..8a4e857c9c1f 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -1327,7 +1327,7 @@ PHP_FUNCTION(mhash_keygen_s2k) context = php_hash_alloc_context(ops); ops->hash_init(context, NULL); - key = ecalloc(1, times * block_size); + key = ecalloc(times, block_size); digest = emalloc(ops->digest_size + 1); for (i = 0; i < times; i++) {

« previous php.cvs (#141285) next »