1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 08:28:26 +02:00
Commit Graph

1153 Commits

Author SHA1 Message Date
Stanislav Malyshev 291b45afb5 Fix bug #67248 (imageaffinematrixget missing check of parameters) 2014-05-11 18:14:57 -07:00
Anatol Belski 3f049bcff2 made libgd recognize the 9 version series 2014-03-12 19:30:27 +01:00
Remi Collet 862c006da1 Fix bug #66887 imagescale - poor quality of scaled image
Issue with signed char overflow.

Upstream fix:
https://bitbucket.org/libgd/gd-libgd/commits/4b86e06937bc5ff116be969137f8da9d1a7869d5
2014-03-12 17:10:51 +01:00
Remi Collet f2d5b2b6c6 Fixed Bug #66893i imagescale ignore method argument
We also have our goto fail; bug.

Upstream fix for libgd
https://bitbucket.org/libgd/gd-libgd/commits/5b42b1178c37ffd30c9a15733058656be0277da0
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
Remi Collet af09d8b96a Fixed Bug #66815 imagecrop(): insufficient fix for NULL defer CVE-2013-7327
This amends commit 8f4a537, which aimed to correct NULL dereference because of
missing check of gdImageCreateTrueColor() / gdImageCreate() return value.  That
commit checks for negative crop rectangle width and height, but
gdImageCreate*() can also return NULL when width * height overflows.  Hence
NULL deref is still possible, as gdImageSaveAlpha() and gdImagePaletteCopy()
is called before dst == NULL check.

This moves NULL check to happen right after gdImageCreate*().  It also removes
width and height check before gdImageCreate*(), as the same check is done by
image create functions (with an extra warning).

From thoger redhat com
2014-03-05 10:40:36 +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
Remi Collet 464c219ed4 minor fix on previous 2013-12-28 14:29:14 +01:00
Remi Collet 8f4a5373bb Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
Initial fix was PHP stuff
This one is libgd fix.

- filter invalid crop size
- dont try to copy on invalid position
- fix crop size when out of src image
- fix possible NULL deref
- fix possible integer overfloow
2013-12-28 14:22:13 +01: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
Adam Harvey d7a45a67be Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Switch to using freetype-config for freetype detection.
2013-12-07 19:41:23 -08:00
Adam Harvey a0955f351c Switch to using freetype-config for freetype detection.
This fixes GD compilation against libfreetype 2.5.1 and later after they made
the rather interesting decision to change their include directory layout in a
point release.

The original suggestion in the bug was to use pkg-config, but my inclination is
to use freetype-config instead: we should be able to get the same configuration
information without actually needing pkg-config installed, since pkg-config is
by no means guaranteed to exist on many Unices and distros, whereas
freetype-config should always be present if a libfreetype build environment is
installed. Let's try it out and see what happens.

Fixes bug #64405 (Use freetype-config for determining freetype2 dir(s)).
2013-12-07 19:39:40 -08:00
Felipe Pena 0d6247f968 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fix extern declaration according to definition
2013-10-20 01:16:10 -02:00
Felipe Pena a1daebefda - Fix extern declaration according to definition 2013-10-20 01:16:07 -02:00
unknown b54b6e30a4 ensure that the defined interpolation method is used by the generic scaling functions 2013-09-09 11:56:05 +02:00
Christopher Jones cd14de94d2 Reduce compiler noise by removing unused variables and labels 2013-08-14 21:06:59 -07:00
Christopher Jones c6d977dd39 Fix long-standing visual pain point: the misalignment of './configure help' text.
Whitespace changes and a couple of grammar fixes.
2013-08-06 11:06:09 -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
Christopher Jones cd7e56e536 Cleanup temp file 2013-07-09 14:51:47 -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
Remi Collet b4632d0c12 Upstream fix from https://bitbucket.org/libgd/gd-libgd/issue/75 2013-06-24 11:03:12 +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
Pierre Joye 07e52857b5 fix #65070, bgcolor does not use the same format as the input image with imagerotate 2013-06-20 22:19:33 +02:00
Stanislav Malyshev 02e4d7a290 Merge branch 'pull-request/341'
* pull-request/341: (23 commits)
  typofixes
2013-06-10 14:30:59 -07:00
Stanislav Malyshev ac40c0b562 Merge branch 'pull-request/341'
* pull-request/341: (23 commits)
  typofixes
2013-06-10 14:20:18 -07:00
Jakub Vrana 46d3738d0a Fix image method signatures 2013-06-10 02:24:03 -07:00
Remi Collet 3579e81200 Fixed Bug #64962 imagerotate produce corrupted image
See https://bitbucket.org/libgd/gd-libgd/issue/67/problem-with-gdrotate

This computation need to be done in signed range.
2013-06-03 15:01:48 +02: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
Pierre Joye 2f01e06786 fix #64898imagerotate is broken with bilinear interpolation 2013-05-27 09:21:41 +02:00
Anatol Belski 082ee90b9b fixe preprocessor definition 2013-05-15 14:24:21 +02:00
Remi Collet 36eee5b994 Fixed bug #64785 : restore 5.4 behaviour, libpng is mandatory 2013-05-08 07:37:40 +02:00
Remi Collet de7415ea55 gd: fix 2 failed tests (bundled lib) due to arithmetic precision (allow minor diff). 2013-05-06 10:25:36 +02:00
Remi Collet 96a575123d gd: fix previous (bad include) 2013-05-06 10:07:06 +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 4cea61a0fa gd: fix include... 2013-05-05 10:39:33 +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 54d6f8b34e gd: missing comma 2013-05-05 06:52:28 +02:00
Remi Collet 2ab270011d gd: fix typo and cleanups 2013-05-04 20:36:32 +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ý e6704501f8 Remove extra unused functions from gd_compat.h 2013-05-04 16:50:11 +02:00
Ondřej Surý 5e9c6c3b64 Rewrite Xpm library check so it doesn't break on MultiArch systems 2013-05-04 16:50:08 +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