Commit a853ddf
committed
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.1 parent 087a08d commit a853ddf
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | | - | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
0 commit comments