[php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6

From: Date: Tue, 06 Oct 2026 15:37:00 +0000
Subject: [php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142015@lists.php.net to get a copy of this message
Author: Ilia Alshanetsky (iliaal) Date: 2026-10-06T11:17:31-04:00 Commit: https://github.com/php/php-src/commit/7aa003e5396d27a6b040db01072e6018e0074c99 Raw diff: https://github.com/php/php-src/commit/7aa003e5396d27a6b040db01072e6018e0074c99.diff Merge branch 'PHP-8.5' into PHP-8.6 * PHP-8.5: Fix alternate form flag for %x testing stale signed value Changed paths: A ext/fileinfo/tests/cdf_unknown_property_id.phpt M main/snprintf.c Diff: diff --git a/ext/fileinfo/tests/cdf_unknown_property_id.phpt b/ext/fileinfo/tests/cdf_unknown_property_id.phpt new file mode 100644 index 000000000000..f93a5c7b0b1e --- /dev/null +++ b/ext/fileinfo/tests/cdf_unknown_property_id.phpt @@ -0,0 +1,13 @@ +--TEST-- +Unknown CDF property IDs are printed with the 0x prefix +--EXTENSIONS-- +fileinfo +--FILE-- +<?php +$data = file_get_contents(__DIR__ . '/resources/test.ppt'); +$data[40576] = "\x1f"; +$desc = (new finfo())->buffer($data); +echo substr($desc, strrpos($desc, ', ') + 2), "\n"; +?> +--EXPECT-- +0x1f: 0 diff --git a/main/snprintf.c b/main/snprintf.c index 73c981a1cee7..aaf27680df65 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -798,7 +798,7 @@ static size_t format_converter(buffy * odp, const char *fmt, va_list ap) /* {{{ } s = ap_php_conv_p2(ui_num, 4, *fmt, &num_buf[NUM_BUF_SIZE], &s_len); FIX_PRECISION(adjust_precision, precision, s, s_len); - if (alternate_form && i_num != 0) { + if (alternate_form && ui_num != 0) { *--s = *fmt; /* 'x' or 'X' */ *--s = '0'; s_len += 2;

« previous php.cvs (#142015) next »