1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

929 Commits

Author SHA1 Message Date
Weilin Du
2918caee20 ext/*: Remove break after return (#21485) 2026-03-23 20:30:13 +01:00
Arshid
d84ad6a532 ext/gd: remove _php_image_output unused argument (#21138) 2026-02-05 17:52:42 +00:00
Weilin Du
4f793ba1c3 [skip ci] Fix duplicate words typos (GH-20800) 2025-12-31 02:22:09 +01:00
David Carlier
4cc5f02387 Merge branch 'PHP-8.5'
* PHP-8.5:
  ext/gd: fix build
2025-12-04 23:25:42 +00:00
David Carlier
e910bbf144 ext/gd: fix build 2025-12-04 23:25:29 +00:00
David Carlier
8504b18a34 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20622: imagestring/imagestringup overflow/underflow.
2025-12-04 23:16:22 +00:00
David Carlier
400aa844a6 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20622: imagestring/imagestringup overflow/underflow.
2025-12-04 23:16:08 +00:00
David Carlier
2c2852ae8e Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20622: imagestring/imagestringup overflow/underflow.
2025-12-04 23:14:01 +00:00
David Carlier
9f654decdc Fix GH-20622: imagestring/imagestringup overflow/underflow.
close GH-20623
2025-12-04 23:13:29 +00:00
David Carlier
dddd050486 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20602: imagescale() overflow with large height values.
2025-11-29 13:33:04 +00:00
David Carlier
848269d6a8 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20602: imagescale() overflow with large height values.
2025-11-29 13:32:18 +00:00
David Carlier
6d5490861f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20602: imagescale() overflow with large height values.
2025-11-29 13:31:38 +00:00
David Carlier
c8e13af455 Fix GH-20602: imagescale() overflow with large height values.
close GH-20605
2025-11-29 13:30:49 +00:00
David Carlier
94e65d301b Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20551: imagegammacorrect out of range gamma value.
2025-11-22 22:23:53 +00:00
David Carlier
4d71d8a454 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20551: imagegammacorrect out of range gamma value.
2025-11-22 22:23:41 +00:00
David Carlier
30cb1998ae Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20551: imagegammacorrect out of range gamma value.
2025-11-22 22:22:50 +00:00
David Carlier
f88d247ce2 Fix GH-20551: imagegammacorrect out of range gamma value.
close GH-20552
2025-11-22 22:22:27 +00:00
Tim Düsterhus
6da93a86f2 zend_API: Remove CHECK*NULL_PATH (#20155)
* tree-wide: Replace `CHECK_NULL_PATH()` by `zend_char_has_nul_byte()`

The former is a direct alias of the latter with a more explicit name and the
former is explicitly documented as a “compatibility” alias.

* tree-wide: Replace `CHECK_ZVAL_NULL_PATH()` by its definition

The former is explicitly documented as a “compatibility” alias.

* zend_API: Remove `CHECK*NULL_PATH`

The `CHECK_ZVAL_NULL_PATH()` macro is unsafe, because it implicitly assumes
that the given `zval*` is `IS_STRING`.

Based on a GitHub search there does not seem to be any user outside of PHP, all
hits were just forks / copies of php-src.
2025-10-15 10:24:22 +02:00
Gina Peter Banyard
6cb21229f8 ext/gd/imagefilter: Improve wording of ArgCount error
This is done by parsing this as 2 arguments with variadics that are never actually parsed
2025-10-13 23:07:41 +01:00
Gina Peter Banyard
c1d0c61e81 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20070: Return type violation in imagefilter when an invalid filter is provided
2025-10-12 23:09:47 +01:00
Gina Peter Banyard
e7aea3db48 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20070: Return type violation in imagefilter when an invalid filter is provided
2025-10-12 23:09:09 +01:00
Gina Peter Banyard
26f989313e Fix GH-20070: Return type violation in imagefilter when an invalid filter is provided
Closes GH-20071
2025-10-12 23:08:08 +01:00
David Carlier
b697d1bcfa Merge branch 'PHP-8.4' 2025-09-07 18:19:21 +01:00
David Carlier
a0b7dab64b Merge branch 'PHP-8.3' into PHP-8.4 2025-09-07 18:19:08 +01:00
David Carlier
93865a4086 Fix GH-19578: imagefilledellipse underflow on width argument.
close GH-19579
2025-09-07 18:18:17 +01:00
Daniel Scherzer
a68f3d6374 [RFC] Deprecate imagedestroy() (#19454)
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-12 05:50:09 -07:00
Gina Peter Banyard
eaf24ba4e2 Merge branch 'PHP-8.4'
* PHP-8.4:
  ext/gd: Fix comparison with result of php_stream_can_cast()
2025-07-28 11:55:43 +01:00
Gina Peter Banyard
19c84e2687 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/gd: Fix comparison with result of php_stream_can_cast()
2025-07-28 11:55:14 +01:00
Gina Peter Banyard
83b8d2c290 ext/gd: Fix comparison with result of php_stream_can_cast()
Closes GH-19107
2025-07-28 11:54:19 +01:00
Peter Kokot
d40b603856 ext/gd: Make BMP always available (#19115)
- When building with bundled libgd, it has support for BMP
- When building with external libgd, at least 2.1.0 is required, which
  has BMP support.
- The HAVE_GD_PNG moved to PHP_GD_PNG Autoconf macro as it is always
  required when building with bundled libgd.
2025-07-13 15:25:53 +02:00
Peter Kokot
ba68cbefc5 ext/gd: Make TGA always available (#19105)
- When building with bundled libgd, it has support for TGA
- When building with external libgd, at least 2.1.0 is required, which
  has TGA support.
2025-07-13 11:45:44 +02:00
David CARLIER
2c3a2da48a ext/gd: array supplied to user optimisations. (#18366)
explictly allocate packed arrays when it applies.
2025-04-20 17:30:12 +01:00
David CARLIER
2e7df9e423 ext/gd: imagefilter* using overflow checks. (#18283)
Accept up to UINT_MAX * sizeof(int) colors.
2025-04-19 16:27:14 +01:00
Gina Peter Banyard
7a7b388401 ext/gd: Move FREETYPE defines into the ifdef 2025-04-05 18:12:21 +01:00
Gina Peter Banyard
b647716199 ext/gd: Use RETURN_BOOL() where applicable
Instead of an if/else
2025-04-05 18:12:21 +01:00
Gina Peter Banyard
be93f29f2f ext/gd: Reduce scope of variables 2025-04-05 18:12:21 +01:00
Gina Peter Banyard
9491c6850b ext/gd: Use uint32_t type instead of int type 2025-04-05 18:12:21 +01:00
Gina Peter Banyard
80ea28e918 ext/gd: Remove useless ext/standard header include 2025-04-05 18:12:21 +01:00
David Carlier
abf6f8be71 Merge branch 'PHP-8.4' 2025-04-05 15:57:59 +01:00
David Carlier
471995c5f7 Merge branch 'PHP-8.3' into PHP-8.4 2025-04-05 15:57:26 +01:00
David Carlier
fe8dffef5d Fixed GH-18243: imagettftext underflow/overflow on size argument.
close GH-18245
2025-04-05 15:56:45 +01:00
Gina Peter Banyard
bda9ff8338 ext/gd: Flip size and nb arguments for safe_emalloc()
The size should be the second one
2025-04-04 15:12:06 +01:00
David Carlier
18102ec708 Merge branch 'PHP-8.4' 2025-03-28 17:31:50 +00:00
David Carlier
3a5c87f964 Merge branch 'PHP-8.3' into PHP-8.4 2025-03-28 17:31:13 +00:00
David Carlier
a1620048fb ext/gd: imagecrop rect argument overflow fixes.
```
ext/gd/libgd/gd.c:2275:14: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
    #0 0x5d6a2103e1db in php_gd_gdImageCopy /home/dcarlier/Contribs/php-src/ext/gd/libgd/gd.c:2275
    #1 0x5d6a210a2b63 in gdImageCrop /home/dcarlier/Contribs/php-src/ext/gd/libgd/gd_crop.c:57
    #2 0x5d6a21018ca4 in zif_imagecrop /home/dcarlier/Contribs/php-src/ext/gd/gd.c:3575
    #3 0x5d6a21e46e7a in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER /home/dcarlier/Contribs/php-src/Zend/zend_vm_execute.h:1337
    #4 0x5d6a221188da in execute_ex /home/dcarlier/Contribs/php-src/Zend/zend_vm_execute.h:57246
    #5 0x5d6a221366bd in zend_execute /home/dcarlier/Contribs/php-src/Zend/zend_vm_execute.h:61634
    #6 0x5d6a21d107a6 in zend_execute_scripts /home/dcarlier/Contribs/php-src/Zend/zend.c:1895
    #7 0x5d6a21a63409 in php_execute_script /home/dcarlier/Contribs/php-src/main/main.c:2529
    #8 0x5d6a22516d5e in do_cli /home/dcarlier/Contribs/php-src/sapi/cli/php_cli.c:966
    #9 0x5d6a2251981d in main /home/dcarlier/Contribs/php-src/sapi/cli/php_cli.c:1341
    #10 0x7f10d002a3b7 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #11 0x7f10d002a47a in __libc_start_main_impl ../csu/libc-start.c:360
    #12 0x5d6a20a06da4 in _start (/home/dcarlier/Contribs/php-src/sapi/cli/php+0x2806da4) (BuildId: d9a79c7e0e4872311439d7313cb3a81fe04190a2)
```

close GH-18006
2025-03-28 17:30:25 +00:00
David Carlier
ea86442857 Merge branch 'PHP-8.4' 2025-03-07 18:08:30 +00:00
David Carlier
bc55177832 Merge branch 'PHP-8.3' into PHP-8.4 2025-03-07 18:07:48 +00:00
David Carlier
07ceadf7d9 Fix GH-17984: gd calls with array arguments.
close GH-17985
2025-03-07 18:07:14 +00:00
David CARLIER
18df1e4783 ext/gd create gd object with zend_object_alloc (#17823)
while at it, fix build warning "wrong" calloc arguments order
2025-02-16 00:05:37 +00:00
David Carlier
65a20d5a09 Merge branch 'PHP-8.4' 2025-02-05 19:41:16 +00:00