From 1d8976fbfb7321cef957059288ab819466cf3683 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 2 Dec 2024 20:58:56 +0100 Subject: [PATCH] Fix GH-17017: OOB read when starting up file cache `zend_system_id` is not zero-terminated; as such we must constrain the number of characters we print. --- ext/opcache/ZendAccelerator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 3cc5097234254..3bb69eb107e35 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -3331,7 +3331,7 @@ static zend_result accel_post_startup(void) } if ( ZCG(accel_directives).file_cache ) { - zend_accel_error(ACCEL_LOG_INFO, "opcache.file_cache running with PHP build ID: %s", zend_system_id); + zend_accel_error(ACCEL_LOG_INFO, "opcache.file_cache running with PHP build ID: %.32s", zend_system_id); zend_stat_t buf = {0};