Commit graph

1761 commits

Author SHA1 Message Date
Christoph M. Becker
68a0639c8f Fix #74744: gd.h: stdarg.h include missing for va_list use in gdErrorMethod 2017-06-11 17:17:01 +02:00
Sean Fraser
7a7e0f7da0
added test for imagecopymergegray(), added color check to test for imagecopymerge() 2017-06-01 08:17:36 +01:00
Xinchen Hui
696bd37e67 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed condition check
  Fixed condition check
  another place

Conflicts:
	ext/mcrypt/mcrypt.c
2017-04-10 14:49:13 +08:00
Xinchen Hui
65d77812fc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed condition check
2017-04-10 14:47:42 +08:00
Xinchen Hui
4bebcb84ad Fixed condition check 2017-04-10 14:47:24 +08:00
Joe Watkins
e6f9553298
Merge branch 'PHP-7.1'
* PHP-7.1:
  fix bug #74343 compile fails on solaris 11 with system libgd
2017-03-30 16:29:15 +01:00
Joe Watkins
6373ce7c1b
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix bug #74343 compile fails on solaris 11 with system libgd
2017-03-30 16:28:37 +01:00
Joe Watkins
ef3140e544
fix bug #74343 compile fails on solaris 11 with system libgd 2017-03-30 16:27:40 +01:00
Tom Van Looy
2c929943e6 fix command not found warning in ext/gd
./configure: line 32011: PHP_GD_TTSTR: command not found
2017-02-24 23:27:54 +01:00
Nikita Popov
b2a4af7b58 Merge branch 'PHP-7.1' 2017-02-02 18:15:11 +01:00
Nikita Popov
2d1955796e Merge branch 'PHP-7.0' into PHP-7.1 2017-02-02 18:14:50 +01:00
Matěj Humpál
acda2563ce Fix bug #74031
Fix incorrect parameter count for imagepng function
2017-02-02 18:13:53 +01:00
Christoph M. Becker
5d0048cd75 Merge branch 'PHP-7.1'
* PHP-7.1:
  Add regression test for bug #47946
2017-01-22 15:15:43 +01:00
Christoph M. Becker
4af464a0df Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add regression test for bug #47946
2017-01-22 15:02:59 +01:00
Christoph M. Becker
71efe9d8fd Add regression test for bug #47946
This bug had already been fixed, but apparently there's no regression
test yet, so we add one.

Note that the expected image has black pixel artifacts, which are
another issue (perhaps bug #40158), and would have to be adressed
separately.
2017-01-22 15:01:01 +01:00
Joe Watkins
d6ef39e04a
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix intermittent segfault in GD library
2017-01-22 06:41:20 +00:00
Joe Watkins
55393e26a5
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix intermittent segfault in GD library
2017-01-22 06:41:07 +00:00
Mitch Hagstrand
e56fe7e5e7
Fix intermittent segfault in GD library
The gdIOCtx struct should be zero filled with ecalloc.
emalloc does not zero fill the struct.
2017-01-22 06:40:55 +00:00
Christoph M. Becker
ee06ca8271 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix #73968: Premature failing of XBM reading
2017-01-21 13:20:47 +01:00
Christoph M. Becker
7a2497b2c5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix #73968: Premature failing of XBM reading
2017-01-21 13:18:54 +01:00
Christoph M. Becker
f67d599a01 Fix #73968: Premature failing of XBM reading
We must take into account the line padding, when we're reading XBM
files.

We deliberately ignore the potential integer overflow here, because
that would be caught by gdImageCreate() or even earlier if `bytes==0`,
what happens in libgd00094.phpt which we adapt accordingly.
2017-01-21 13:04:36 +01:00
Anatol Belski
7ad94a010d fix changed symbol 2017-01-17 10:10:12 +01:00
Anatol Belski
23db1ce3ba Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix #73869: Signed Integer Overflow gd_io.c
  Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()
2017-01-17 09:36:42 +01:00
Anatol Belski
cea050b8da Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix #73869: Signed Integer Overflow gd_io.c
  Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()
2017-01-17 09:35:26 +01:00
Anatol Belski
5d07438cb3 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix #73869: Signed Integer Overflow gd_io.c
  Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()
2017-01-17 09:33:51 +01:00
Christoph M. Becker
d2274b01cb Fix #73869: Signed Integer Overflow gd_io.c
GD2 stores the number of horizontal and vertical chunks as words (i.e. 2
byte unsigned). These values are multiplied and assigned to an int when
reading the image, what can cause integer overflows. We have to avoid
that, and also make sure that either chunk count is actually greater
than zero. If illegal chunk counts are detected, we bail out from
reading the image.

(cherry picked from commit 5b5d9db3988b829e0b121b74bb3947f01c2796a1)
2017-01-17 09:30:58 +01:00
Christoph M. Becker
f1b2afc9d9 Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()
We must not pretend that there are image data if there are none. Instead
we fail reading the image file gracefully.

(cherry picked from commit cdb648dc4115ce0722f3cc75e6a65115fc0e56ab)
2017-01-17 09:30:43 +01:00
Christoph M. Becker
703c0043a0 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix #73893: A hidden danger of death cycle in a function of gd

# Conflicts:
#	ext/gd/libgd/gd_rotate.c
2017-01-10 20:15:05 +01:00
Christoph M. Becker
fc46003666 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix #73893: A hidden danger of death cycle in a function of gd
2017-01-10 20:13:16 +01:00
Christoph M. Becker
15837bab8c Fix #73893: A hidden danger of death cycle in a function of gd
We remove the unused, but potentially dangerous functions.
2017-01-10 19:52:06 +01:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Christoph M. Becker
500b496f8e Implement #69606: Support BMPs (added in GD 2.1.0)
We add PHP bindings for libgd's features to read and write BMP files, which
are available as of libgd 2.1.0.

As PHP's bundled libgd doesn't yet include the respective features of the
external libgd, we add these.
2017-01-04 14:55:02 +01:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Stanislav Malyshev
76c02dcdf7 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix #73549: Use after free when stream is passed to imagepng
2016-11-27 14:54:19 -08:00
Stanislav Malyshev
8cc42537d2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix #73549: Use after free when stream is passed to imagepng
2016-11-27 14:53:39 -08:00
Stanislav Malyshev
1cb58ead70 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix #73549: Use after free when stream is passed to imagepng
2016-11-27 14:53:27 -08:00
Christoph M. Becker
5049ef2f1c Fix #73549: Use after free when stream is passed to imagepng
If a stream is passed to imagepng() or other image output functions,
opposed to a filename, we must not close this stream.
2016-11-27 14:51:02 -08:00
Christoph M. Becker
a35359f8b7 Merge branch 'PHP-7.1' 2016-11-25 23:33:02 +01:00
Christoph M. Becker
51ba53ed0f Merge branch 'PHP-7.0' into PHP-7.1 2016-11-25 23:27:13 +01:00
Christoph M. Becker
bc979aee6d Merge branch 'PHP-5.6' into PHP-7.0 2016-11-25 23:16:18 +01:00
Christoph M. Becker
7f529e3dee Fix #73582: Failing ext/gd/tests/imagettftext_charmap_order.phpt
This test is not supposed to work with JIS-mapped Japanese font support
enabled.
2016-11-25 23:14:08 +01:00
Nikita Popov
5af586bec5 Remove more PHP 6 leftovers from tests 2016-11-24 22:39:39 +01:00
Anatol Belski
bfb9be9bd4 Merge branch 'PHP-7.1'
* PHP-7.1:
  remove TSRMLS_*
2016-11-22 00:33:29 +01:00
Anatol Belski
d61db8d602 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  remove TSRMLS_*
2016-11-22 00:32:42 +01:00
Anatol Belski
5e9b4c26a5 remove TSRMLS_* 2016-11-21 23:53:37 +01:00
Nikita Popov
45f7b2bcc8 Fix CRLF line-endings in tests
Also fix a single instance of CRLF in ibase_query.c.
2016-11-20 22:31:24 +01:00
Christoph M. Becker
189bbb586c Merge branch 'pull-request/2164' 2016-11-13 23:31:40 +01:00
Anatol Belski
a75827b4f9 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73418 Integer Overflow in "_php_imap_mail" leads to crash
  Fixed bug #73418 Integer Overflow in "_php_imap_mail" leads to crash
  Fix #72696: imagefilltoborder stackoverflow on truecolor images
  Fix #72482: Ilegal write/read access caused by gdImageAALine overflow
  Fix bug #73144 and bug #73341 - remove extra dtor
  remove unreferenced var came in with merge
  Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle
  Fix #72696: imagefilltoborder stackoverflow on truecolor images
  Fix #72482: Ilegal write/read access caused by gdImageAALine overflow
  fix version
  set versions
  Fix bug #73144 and bug #73341 - remove extra dtor
  Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle
2016-11-08 11:16:55 +01:00
Anatol Belski
9b81342352 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73418 Integer Overflow in "_php_imap_mail" leads to crash
  Fixed bug #73418 Integer Overflow in "_php_imap_mail" leads to crash
  Fix #72696: imagefilltoborder stackoverflow on truecolor images
  Fix #72482: Ilegal write/read access caused by gdImageAALine overflow
  Fix bug #73144 and bug #73341 - remove extra dtor
  remove unreferenced var came in with merge
  Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle
  Fix #72696: imagefilltoborder stackoverflow on truecolor images
  Fix #72482: Ilegal write/read access caused by gdImageAALine overflow
  fix version
  set versions
  Fix bug #73144 and bug #73341 - remove extra dtor
  Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle
2016-11-08 11:15:06 +01:00