Skip to content

Commit 85f7e54

Browse files
authored
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.
1 parent bcb7f9b commit 85f7e54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3331,7 +3331,7 @@ static zend_result accel_post_startup(void)
33313331
}
33323332

33333333
if ( ZCG(accel_directives).file_cache ) {
3334-
zend_accel_error(ACCEL_LOG_INFO, "opcache.file_cache running with PHP build ID: %s", zend_system_id);
3334+
zend_accel_error(ACCEL_LOG_INFO, "opcache.file_cache running with PHP build ID: %.32s", zend_system_id);
33353335

33363336
zend_stat_t buf = {0};
33373337

0 commit comments

Comments
 (0)