Skip to content

Commit

Permalink
Fix phpGH-17017: OOB read when starting up file cache (phpGH-17023)
Browse files Browse the repository at this point in the history
`zend_system_id` is not zero-terminated; as such we must constrain the
number of characters we print.
  • Loading branch information
cmb69 authored Dec 3, 2024
1 parent bcb7f9b commit 85f7e54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down

0 comments on commit 85f7e54

Please sign in to comment.