[php-src] master: fpm: fix potential null dereference in fpm_status_export_to_zval()

From: Date: Tue, 27 Oct 2026 17:53:59 +0000
Subject: [php-src] master: fpm: fix potential null dereference in fpm_status_export_to_zval()
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142836@lists.php.net to get a copy of this message
Author: Marcel Hernandez (1ma) Committer: Jakub Zelenka (bukka) Date: 2026-10-27T18:49:55+01:00 Commit: https://github.com/php/php-src/commit/ce3e1bac173d31d7edba8d3035a2aebc89e5e766 Raw diff: https://github.com/php/php-src/commit/ce3e1bac173d31d7edba8d3035a2aebc89e5e766.diff fpm: fix potential null dereference in fpm_status_export_to_zval() Changed paths: M NEWS M sapi/fpm/fpm/fpm_status.c Diff: diff --git a/NEWS b/NEWS index eb8db57e784b..1e7e1e152e20 100644 --- a/NEWS +++ b/NEWS @@ -78,6 +78,8 @@ PHP NEWS . Fixed bug GH-24046 (FPM worker stdio pipe fd closed twice when a child process outlives the worker, breaking a later worker's stdio). (Ian P. Christian, ndossche) + . Fixed null pointer dereference in fpm_get_status() when the scoreboard + copy fails. (Marcel Hernandez) - Fileinfo: . Fixed bug GH-24289 (finfo::file() reports the wrong argument number for diff --git a/sapi/fpm/fpm/fpm_status.c b/sapi/fpm/fpm/fpm_status.c index ff6ef68f3949..da907a9d1af1 100644 --- a/sapi/fpm/fpm/fpm_status.c +++ b/sapi/fpm/fpm/fpm_status.c @@ -56,6 +56,9 @@ int fpm_status_export_to_zval(zval *status) int i; scoreboard_p = fpm_scoreboard_copy(NULL, 1); + if (!scoreboard_p) { + return -1; + } now_epoch = time(NULL); fpm_clock_get(&now);

« previous php.cvs (#142836) next »