Commit 5af56148a22 for php.net

commit 5af56148a2273f16c0e3f09809d24a9bc2e722c9
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date:   Tue Jun 23 11:12:53 2026 -0400

    ext/gd: pack imageloadfont short-read test in native byte order

    imageloadfont_short_read packed the font header with pack('V4', ...)
    (little-endian), but imageloadfont() reads the header as native-endian
    ints. On big-endian hosts (PPC64 nightly) the byte-swapped values
    overflow the INT_MAX guard before the FLIPWORD fallback runs, so the
    font is rejected and the test fails. Pack the fields with 'i' to keep
    the header valid regardless of host endianness.

    Closes GH-22416

diff --git a/ext/gd/tests/imageloadfont_short_read.phpt b/ext/gd/tests/imageloadfont_short_read.phpt
index 5a7f6a14c9b..406c64b9959 100644
--- a/ext/gd/tests/imageloadfont_short_read.phpt
+++ b/ext/gd/tests/imageloadfont_short_read.phpt
@@ -7,7 +7,9 @@
 /* A user-space wrapper returns one byte per read, so php_stream_read() hands
  * imageloadfont()'s header loop a short read on every iteration. The header
  * (4 ints) plus a single 1x1 glyph byte form a valid font, which only loads
- * when each short read lands at the correct byte offset. */
+ * when each short read lands at the correct byte offset. imageloadfont() reads
+ * the header as native-endian ints, so pack the fields with 'i' (not 'V') to
+ * keep the font valid on big-endian hosts too. */
 class drip
 {
     public $context;
@@ -16,7 +18,7 @@ class drip

     public function stream_open($path, $mode, $options, &$opened): bool
     {
-        $this->data = pack('V4', 1, 32, 1, 1) . "\x00";
+        $this->data = pack('i4', 1, 32, 1, 1) . "\x00";
         return true;
     }