Commit Graph

500 Commits

Author SHA1 Message Date
Christoph M. Becker
7469c7e7d0 Fixed bug #61221 - imagegammacorrect function loses alpha channel
When applying imagegammacorrect() the alpha channel is now fully retained, instead of being completely lost.
2015-06-17 02:15:59 +02:00
Stanislav Malyshev
4e2fb47092 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #69646	OS command injection vulnerability in escapeshellarg
  Fix #69719 - more checks for nulls in paths
  fix test description
  Fixed Buf #68812 Unchecked return value.

Conflicts:
	ext/dom/document.c
	ext/gd/gd.c
2015-06-09 15:31:27 -07:00
Stanislav Malyshev
f7d7befae8 Fix #69719 - more checks for nulls in paths 2015-06-09 10:52:38 -07:00
Stanislav Malyshev
0cb9d75cb6 Merge branch 'PHP-5.4.40' into PHP-5.5.24
* PHP-5.4.40:
  Additional fix for bug #69324
  More fixes for bug #69152
  Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
  Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar)
  Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER)
  Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4)
  Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault)
  Fixed bug #68901 (use after free)
  Fixed bug #68740 (NULL Pointer Dereference)
  Fix bug #66550 (SQLite prepared statement use-after-free)
  Better fix for #68601 for perf 81e9a993f2
  Fix bug #68601 buffer read overflow in gd_gif_in.c
  Revert "Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4"
  Fixed bug #69293
  Add ZEND_ARG_CALLABLE_INFO to allow internal function to type hint against callable.
2015-04-11 16:56:12 -07:00
Stanislav Malyshev
4435b9142f Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) 2015-04-11 16:53:22 -07:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Remi Collet
2728e6f017 Fixed Bug #65171 imagescale() fails
Third param (height) is set as optional,
but default value = -1 is incorrect

Compute correct height to preserve ratio.
2014-10-15 19:13:25 +02:00
Stanislav Malyshev
291b45afb5 Fix bug #67248 (imageaffinematrixget missing check of parameters) 2014-05-11 18:14:57 -07:00
Remi Collet
f2d5b2b6c6 Fixed Bug #66893i imagescale ignore method argument
We also have our goto fail; bug.

Upstream fix for libgd
5b42b1178c
2014-03-12 15:35:42 +01:00
Remi Collet
dada2f550f Fixed Bug #66890 imagescale segfault
zend_parse_parameters "l" expect long, not int
2014-03-12 13:44:58 +01:00
Pierre Joye
8e3c2015dc - fix #66869, Invalid 2nd argument crashes imageaffinematrixget 2014-03-09 21:12:19 +01:00
Brad Daily
143bb29c1a Fixes #66714: imageconvolution breakage in 5.5.9
5.5.9 included some GD fixes related to #66356. One of those fixes changed the 
above section of imageconvolution, but the variable was mistyped.
2014-02-19 15:24:15 -06:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Xinchen Hui
2938329ce1 Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
And also fixed the bug: arguments are altered after some calls
2013-12-27 14:04:59 +08:00
Christopher Jones
cd14de94d2 Reduce compiler noise by removing unused variables and labels 2013-08-14 21:06:59 -07:00
Veres Lajos
e9a95d78ef typo fixes 2013-07-15 00:23:03 -07:00
Veres Lajos
72085b0e5f typo fixes 2013-07-15 00:18:57 -07:00
Remi Collet
9da4985bf2 fix imagecreatefromwebp and imagewebp protos 2013-06-24 11:15:50 +02:00
Remi Collet
8075f1f4a3 Use same logic to load WebP image that other formats 2013-06-24 11:10:52 +02:00
Jakub Vrana
e1acaea4f1 Require second parameter of imagecrop() 2013-06-23 20:29:54 -07:00
Remi Collet
fc898ee0f9 Fixed Bug #65060 imagecreatefrom... crashes with user streams
Fixed Bug #65084 imagecreatefromjpeg fails with URL

Regression introduced in 8a90aad (drop of USE_GD_IOCTX)
Secure with php_stream_can_cast to avoid segfault in php_stream_cast.
(encountered when imagecreatefromxpm with URL)
2013-06-21 14:11:04 +02:00
Jakub Vrana
46d3738d0a Fix image method signatures 2013-06-10 02:24:03 -07:00
Remi Collet
99ea60c2dd Fixed Bug #64961 segfault in imagesetinterpolation
enum type are not long ;) so cannot be used as zend_parse_parameters arg.
2013-06-03 14:15:18 +02:00
Remi Collet
9480de29db Revert removal of overflow2 use in gd.c
Function provided by gd_security with bundled libgd
Function provided by gd_compat with system libgd

This fix failed test imageloadfont_invalid.phpt
This test now also pass with system libgd
2013-05-06 10:00:45 +02:00
Remi Collet
0cae9a15d7 Move (back) missing functions in system libgd to gd_compat
- display libPng version in all cases
- gd_compat.c in ext/gd (nothing in ext/gd/libgd)
2013-05-05 09:54:27 +02:00
Remi Collet
9a48b6506c gd: don't include png.h (breaks build on some old version), so report libPNG version only with external libgd 2013-05-05 08:35:29 +02:00
Remi Collet
00b097d2a3 fix build with bundled libgd 2013-05-04 16:51:56 +02:00
Ondřej Surý
2a2ac5f2be Move png and jpeg version functions to gd.c so the external library build doesn't include anything from libgd/. 2013-05-04 16:50:13 +02:00
Ondřej Surý
8a90aad35b Required GD >= 2.1.0 or GD bundled, this allows us to remove most of the #ifdef 2013-05-04 16:50:06 +02:00
Ondřej Surý
2fc17d83cb * Remove overflow2, getmbi and skipheaders from gd_compat.h * Add missing return in _php_ctx_getmbi * Reintroduce imagecreatefromxbm by checking for gdCreateImageFromXbm 2013-05-04 16:50:03 +02:00
Ondřej Surý
6aedadce0a Allow to use new GD-2.1.0 function from system library 2013-05-04 16:49:35 +02:00
Pierre Joye
25c9f34c9c fix #64725, wrong res check 2013-04-27 17:52:30 +02:00
Pierre Joye
2809afa119 - #64710, check return val 2013-04-26 08:15:33 +02:00
Pierre Joye
b0afef2d5e #64710, kill unused vars 2013-04-26 08:10:24 +02:00
Pierre Joye
7b06189702 #64710, kill unused vars 2013-04-26 08:08:38 +02:00
Pierre Joye
3fffc78ed0 #64710, kill unused vars 2013-04-26 08:07:47 +02:00
Pierre Joye
afe46d4d47 #64710, Implicit declaration 2013-04-26 07:48:11 +02:00
Remi Collet
3a8ceed844 allow use of gdImageCreateFromJpegEx with system libgd 2013-04-24 16:15:11 +02:00
Remi Collet
dd0399f5c6 We need both gdImageCreateFromJpeg* and gdImageCreateFromJpeg*Ex
The new (Ex) functions are used with the new ignore_warning parameter

The standard functions are used in _php_image_create_from_string,
sent as a function pointer, and call without this optional parameter.
2013-04-24 16:07:50 +02:00
Remi Collet
7189cc5be8 gd: fix proto comment 2013-04-24 14:44:20 +02:00
Remi Collet
aa4b0af20f gd: provide imageflip with system libgd when available 2013-04-24 14:32:03 +02:00
Remi Collet
2005a15caa fix copy/paste in error message 2013-04-23 13:53:00 +02:00
Remi Collet
eb50789910 (re)allow WBMP detection with system libgd
provide getbmi and skipheader not exported functions in gd_compat.
2013-04-23 13:43:57 +02:00
Remi Collet
ec1678dd7c temporary disable WBM detection with system libgd, as gdGetC, getmbi and skipheader not exported 2013-04-22 17:48:28 +02:00
Pierre Joye
e71b794569 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  lucky that the name is not used, fix name of encoder
2013-04-11 07:08:39 +02:00
Pierre Joye
684f4d5272 lucky that the name is not used, fix name of encoder 2013-04-11 06:42:38 +02:00
Pierre Joye
87f5d9aa1b Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  add external 2.1 detection and fix gd_compat for 2.1+
2013-04-10 20:13:46 +02:00
Pierre Joye
c480bf3fb2 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  add external 2.1 detection and fix gd_compat for 2.1+
2013-04-10 20:13:18 +02:00
Pierre Joye
224a67fb9f add external 2.1 detection and fix gd_compat for 2.1+ 2013-04-10 20:12:25 +02:00