From 85f7e5477a5cd81c221c3cc451bc76bdf3c8ac83 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 3 Dec 2024 12:13:53 +0100 Subject: [PATCH] Fix GH-17017: OOB read when starting up file cache (GH-17023) `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 3cc50972342..3bb69eb107e 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};