Commit Graph

1379 Commits

Author SHA1 Message Date
Christoph M. Becker
f9d95a4003 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fix #66590: imagewebp() doesn't pad to even length
2015-07-19 17:45:16 +02:00
Christoph M. Becker
96e42403d5 Fix #66590: imagewebp() doesn't pad to even length
The code in the bundled libgd uses libvpx and writes the riff manually. The
code generates the correct even size, but neglects the padding. It's possible
older versions of libwebp would decode this, but libwebp 0.4.0 does not.

Let's apply the patch supplied by one of the WebP developers.
2015-07-19 17:38:04 +02:00
Christoph M. Becker
77140d8b3d Merge branch 'PHP-5.6'
* PHP-5.6:
  fixed PHPT that is always being skipped or otherwise would fail
2015-07-18 21:35:54 +02:00
Christoph M. Becker
a66efb0b15 fixed PHPT that is always being skipped or otherwise would fail 2015-07-18 21:33:20 +02:00
Nikita Popov
5c95226d50 Various warning fixes 2015-07-17 20:18:25 +02:00
Christoph M. Becker
20eaa186fb Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fix #66882: imagerotate by -90 degrees truncates image by 1px
2015-07-13 22:30:43 +02:00
Christoph M. Becker
2e34febb73 Fix #66882: imagerotate by -90 degrees truncates image by 1px
Contrary to the external libgd, the bundled libgd doesn't use optimized
rotation algorithms for negative square angles. We fix that now.

There are other improvements in gdImageRotateInterpolated() in the external
libgd. I'll leave them out for now, in the hope that we'll be able to rejoin
the two libraries rather soon.
2015-07-13 22:18:56 +02:00
Christoph M. Becker
fabc1b7174 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fix #70064: imagescale(..., IMG_BICUBIC) leaks memory
2015-07-13 18:36:15 +02:00
Christoph M. Becker
1a4722a89e Fix #70064: imagescale(..., IMG_BICUBIC) leaks memory
A temporary image (tmp_im) is created with gdImageTrueColor() and freed with
gdFree() instead of gdImageDestroy(). Let's fix that.
2015-07-13 18:30:33 +02:00
Christoph M. Becker
959b2c3514 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fix #69024: imagescale segfault with palette based image
2015-07-13 15:56:39 +02:00
Christoph M. Becker
fa53d8463f Fix #69024: imagescale segfault with palette based image
imagescale(..., IMG_BICUBIC) is not supposed to work with palette images, so we
fix that by converting to true color if necessary. Basically the same fix has
already been applied to the external libgd[1].

[1] <723ea520be>
2015-07-13 15:48:48 +02:00
Christoph M. Becker
42d1fa29c7 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fix #53154: Zero-height rectangle has whiskers
2015-07-13 01:46:09 +02:00
Christoph M. Becker
094decc3c0 Fix #53154: Zero-height rectangle has whiskers
To avoid drawing the corner pixels twice, gdImageRectangle() draws the vertical
lines 2 points shorter than the actual side of the rectangle. However, this
causes "whiskers" for rectangles with height 0. This patch fixes this issue and
at the same time optimizes the algorithm by drawing only a single line for zero
height and zero width rectangles.
2015-07-13 01:33:00 +02:00
Christoph M. Becker
930a9910d7 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fix #67447: imagecrop() adds a black line when cropping
2015-07-12 23:15:06 +02:00
Christoph M. Becker
891ff131ef Fix #67447: imagecrop() adds a black line when cropping
A simple one-off error: imagecrop)() copied only width-1 and height-1 pixels.
2015-07-12 23:05:53 +02:00
Christoph M. Becker
ce7b5af03f Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fix #68714: copy 'n paste error
2015-07-12 16:39:50 +02:00
Christoph M. Becker
ba7c3a1bb4 Fix #68714: copy 'n paste error
Actually, this is not really a bug fix, but rather a simplification and
optimization in the same vein as has been done with the external libgd, but
going a small step further and joining both for loops.
2015-07-12 16:32:38 +02:00
Christoph M. Becker
a50dda901c Merge branch 'PHP-5.6'
* PHP-5.6:
  Added XFAIL test for bug #53640
2015-07-12 00:12:31 +02:00
Christoph M. Becker
a8dbe655e5 Added XFAIL test for bug #53640 2015-07-12 00:10:56 +02:00
Christoph M. Becker
77cd79012e Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fix #66339: PHP segfaults in imagexbm
2015-07-11 21:01:01 +02:00
Christoph M. Becker
c40f40656e Fix #66339: PHP segfaults in imagexbm
The file parameter of the XBM image ZPP is not properly taken into account. If
it is NULL that would result in a segfault, because gdImageXbmCtx() is not
prepared to take a NULL file_name. If it is not NULL the XBM data would be
written to STDOUT, because the stream is not initialized. This patch fixes both
issues.
2015-07-11 20:54:07 +02:00
Christoph M. Becker
6f574c6dd8 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fix #70047: gd_info() doesn't report WebP support
2015-07-11 17:52:22 +02:00
Christoph M. Becker
450fbdc740 Fix #70047: gd_info() doesn't report WebP support
Despite being documented, the array returned by gd_info() doesn't have a 'WebP
Support' key. This patch adds it.
2015-07-11 17:49:13 +02:00
Xinchen Hui
6de750efb7 Fixed conditional jump or move depends on uninitialised value(s)
==11551==    at 0x57CB23C: xpmParseData (parse.c:702)
2015-07-02 19:02:49 +08:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Rasmus Lerdorf
28d7bb97a1 Fix more proto comments 2015-06-23 17:46:20 -04:00
Kalle Sommer Nielsen
cff872eaad Remove the references to imageps*() after the T1Lib removal (Noticed by Ferenc) 2015-06-19 14:55:10 +02:00
Christoph M. Becker
455c7c8e26 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  updated NEWS
  Fixed bug #61221 - imagegammacorrect function loses alpha channel
2015-06-17 02:25:46 +02:00
Christoph M. Becker
7958a7b38f Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  Fixed bug #61221 - imagegammacorrect function loses alpha channel
2015-06-17 02:18:53 +02:00
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
8b1919ed73 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  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.
2015-06-09 15:32:27 -07: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
Metalaka
5d8055e14d Fix GD tests #69698
May be take a look to [travis/compile.sh](4b9299d155/travis/compile.sh (L60))
2015-05-29 19:18:53 +02:00
Kalle Sommer Nielsen
7dcfdbbee4 Remove T1Lib support (see #69698)
# Also removes imagepscopyfont() which was never available (commented out)
2015-05-29 09:18:36 +02:00
Remi Collet
fc8143f58a Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS
  NEWS
  Fixed Bug #69479 GD fails to build with newer libvpx
2015-05-24 09:40:08 +02:00
Remi Collet
565de1ae64 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  Fixed Bug #69479 GD fails to build with newer libvpx
2015-05-24 09:39:20 +02:00
Remi Collet
e807e07bfa Fixed Bug #69479 GD fails to build with newer libvpx
From upstream d41eb72cd4

Fix build with latest libvpx 1.4.0

These new constants exist at least since 1.0.0
Compatibility ones have been droped in 1.4.0
2015-05-24 09:37:12 +02:00
Stanislav Malyshev
b3709bfc52 Merge branch 'PHP-5.6'
* PHP-5.6: (27 commits)
  fix non-standard C
  update NEWS
  5.4.41 next
  fix CVE num
  update NEWS
  Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode)
  fix test
  fix type in fix for #69085
  fix memory leak & add test
  Fix tests
  fix CVE num
  Fix bug #69337 (php_stream_url_wrap_http_ex() type-confusion vulnerability)
  Fix test
  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)
  ...

Conflicts:
	Zend/zend_exceptions.c
	ext/curl/interface.c
	ext/dom/document.c
	ext/fileinfo/libmagic/softmagic.c
	ext/gd/gd.c
	ext/hash/hash.c
	ext/pgsql/pgsql.c
	ext/phar/phar.c
	ext/phar/phar_internal.h
	ext/standard/http_fopen_wrapper.c
	ext/standard/link.c
	ext/standard/streamsfuncs.c
	ext/xmlwriter/php_xmlwriter.c
	ext/zlib/zlib.c
2015-04-14 01:28:06 -07:00
Stanislav Malyshev
5776fceb16 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: (27 commits)
  fix non-standard C
  update NEWS
  5.4.41 next
  fix CVE num
  update NEWS
  Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode)
  fix test
  fix type in fix for #69085
  fix memory leak & add test
  Fix tests
  fix CVE num
  Fix bug #69337 (php_stream_url_wrap_http_ex() type-confusion vulnerability)
  Fix test
  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)
  ...

Conflicts:
	ext/standard/http_fopen_wrapper.c
2015-04-14 01:05:01 -07:00
Stanislav Malyshev
ba15e8dfd0 Merge branch 'PHP-5.4.40' into PHP-5.5.24
* PHP-5.4.40:
  fix memory leak & add test
  Fix tests
2015-04-12 23:49:16 -07:00
Stanislav Malyshev
a643ccfb90 Fix tests 2015-04-12 20:55:35 -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
Remi Collet
bd31cb7563 Better fix for #68601 for perf
81e9a993f2
2015-04-05 17:36:47 -07:00
Remi Collet
afbf725e73 Fix bug #68601 buffer read overflow in gd_gif_in.c 2015-04-05 17:33:52 -07:00
Anatol Belski
2d78023244 cleanup the mod version macros, round 2 2015-03-23 20:33:54 +01:00
Stanislav Malyshev
736afd48cf Merge branch 'PHP-5.6'
* PHP-5.6:
  Reduce downstream patches
2015-03-22 21:33:52 -07:00
lesniewskister
c12e031530 Reduce downstream patches
As per http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/php/5.6/patches/patch-ext_gd_libgd_gdcache_h?rev=1.1&content-type=text/x-cvsweb-markup
2015-03-22 21:33:45 -07:00
Dmitry Stogov
2fa8d67a5c Use zend_string* instead of char* for opened_patch handling. Avoid reallocations and improve string reuse. 2015-03-04 02:05:28 +03:00