summaryrefslogtreecommitdiff
path: root/ext/gd
Commit message (Collapse)AuthorAgeFilesLines
* Fix #52070: imagedashedline() - dashed line sometimes is not visibleChristoph M. Becker2018-03-303-1/+25
| | | | | We finally remove the inadvertent leftover from the synchronization with GD 2.0.12.
* Fix #73957: signed integer conversion in imagescale()Christoph M. Becker2018-03-102-1/+21
| | | | | | We must not pass values to `gdImageScale()` which cannot be represented by an `unsigned int`. Instead we return FALSE, according to what we already did for negative integers.
* Fix imagesetinterpolation arginfoGabriel Caruso2018-02-241-1/+1
| | | | imagesetinterpolation only requires one parameter.
* Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1Xinchen Hui2018-01-023-5/+20
|\ | | | | | | | | | | | | * 'PHP-7.1' of git.php.net:/php-src: Update NEWS Fixed bug #75571: Potential infinite loop in gdImageCreateFromGifCtx Fix bug #74782: remove file name from output to avoid XSS
| * Merge branch 'PHP-7.0' into PHP-7.1Stanislav Malyshev2018-01-013-5/+20
| |\ | | | | | | | | | | | | | | | | | | * PHP-7.0: Update NEWS Fixed bug #75571: Potential infinite loop in gdImageCreateFromGifCtx Fix bug #74782: remove file name from output to avoid XSS
| | * Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2018-01-013-5/+20
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: Update NEWS Fixed bug #75571: Potential infinite loop in gdImageCreateFromGifCtx Fix bug #74782: remove file name from output to avoid XSS
| | | * Fixed bug #75571: Potential infinite loop in gdImageCreateFromGifCtxChristoph M. Becker2018-01-013-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a signedness confusion in `GetCode_` a corrupt GIF file can trigger an infinite loop. Furthermore we make sure that a GIF without any palette entries is treated as invalid *after* open palette entries have been removed.
* | | | year++Xinchen Hui2018-01-024-4/+4
|/ / /
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2017-11-291-0/+10
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Define floorf if system doesn't have it (follow up for 22c48761)
| * | Define floorf if system doesn't have it (follow up for 22c48761)Lior Kaplan2017-11-291-0/+10
| | | | | | | | | | | | floorf is checked in config.m4
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2017-10-251-0/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fix the SKIPIF part in /ext/gd/tests/bug75437.phpt
| * | Fix the SKIPIF part in /ext/gd/tests/bug75437.phptFabien Villepinte2017-10-251-0/+2
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2017-10-252-0/+19
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fix bug #75437 Wrong reflection on imagewebp
| * | Fix bug #75437 Wrong reflection on imagewebpFabien Villepinte2017-10-252-0/+19
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2017-10-243-22/+244
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fixed bug #65148 (imagerotate may alter image dimensions)
| * | Fixed bug #65148 (imagerotate may alter image dimensions)Christoph M. Becker2017-10-243-22/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | We apply the respective patches from external libgd, work around the still missing `gdImageClone()`, and fix the special cased rotation routines according to Pierre's patch (https://gist.github.com/pierrejoye/59d72385ed1888cf8894a7ed437235ae). We also cater to bug73272.phpt whose result obviously changes a bit.
* | | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2017-10-231-1/+4
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fix memory leak
| * | Fix memory leakAnatol Belski2017-10-231-1/+4
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2017-09-021-2/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fixed bug #75139 (libgd/gd_interpolation.c:1786: suspicious if ?)
| * | Fixed bug #75139 (libgd/gd_interpolation.c:1786: suspicious if ?)Christoph M. Becker2017-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | We back-port https://github.com/libgd/libgd/commit/dd48286 even though we cannot come up with a regression test, because the erroneous condition appears to be impossible to trigger. We also parenthesize the inner ternary operation to avoid confusion.
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2017-08-273-0/+38
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fixed bug #75124 (gdImageGrayScale() may produce colors)
| * | Fixed bug #75124 (gdImageGrayScale() may produce colors)Christoph M. Becker2017-08-273-0/+38
| | | | | | | | | | | | | | | | | | | | | We have to make sure to avoid alpha-blending issues by explicitly switching to `gdEffectReplace` and to restore the old value afterwards. This is a port of <https://github.com/libgd/libgd/commit/a7a7ece>.
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2017-07-301-0/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Shrink test image
| * | Shrink test imageChristoph M. Becker2017-07-301-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | The last (`IDAT`) chunk in this file starting at `0x5e265` reports to have a length of `0x2000` bytes, but there are only `0x1D9B` bytes left. Simply cutting the first `IDAT` chunk which starts at `0x31` and also reports a length of `0x2000` at the same offset should produce the same test results (while reducing the file size to 7.628 bytes).
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2017-07-301-0/+4
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Skip this test if ext/gd is not available
| * | Skip this test if ext/gd is not availableChristoph M. Becker2017-07-301-0/+4
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Stanislav Malyshev2017-07-043-0/+30
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.0: Improve fix for #74145 Fix wddx Fix tests Fixed bug #74111 Fix bug #74603 - use correct buffer size Fix bug #74651 - check EVP_SealInit as it can return -1 Update NEWS Fix bug #74087 Fixed parsing of strange formats with mixed month/day and time strings Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV Fixed bug #74111 Fix #74435: Buffer over-read into uninitialized memory Fix bug #74603 - use correct buffer size Fix bug #74651 - check EVP_SealInit as it can return -1 Update NEWS Fix bug #73807
| * | Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2017-07-043-0/+30
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: Update NEWS Fix bug #74087 Fixed parsing of strange formats with mixed month/day and time strings Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV Fixed bug #74111 Fix #74435: Buffer over-read into uninitialized memory Fix bug #74603 - use correct buffer size Fix bug #74651 - check EVP_SealInit as it can return -1 Update NEWS Fix bug #73807
| | * Fix #74435: Buffer over-read into uninitialized memoryChristoph M. Becker2017-07-043-0/+30
| | | | | | | | | | | | | | | The stack allocated color map buffers were not zeroed before usage, and so undefined palette indexes could cause information leakage.
* | | Merge branch 'PHP-7.0' into PHP-7.1Xinchen Hui2017-04-101-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fixed condition check
| * | Fixed condition checkXinchen Hui2017-04-101-1/+1
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Joe Watkins2017-03-301-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: fix bug #74343 compile fails on solaris 11 with system libgd
| * | fix bug #74343 compile fails on solaris 11 with system libgdJoe Watkins2017-03-301-1/+1
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Nikita Popov2017-02-022-0/+12
|\ \ \ | |/ /
| * | Fix bug #74031Matěj Humpál2017-02-022-0/+12
| | | | | | | | | | | | Fix incorrect parameter count for imagepng function
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2017-01-222-0/+51
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Add regression test for bug #47946
| * | Add regression test for bug #47946Christoph M. Becker2017-01-222-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'PHP-7.0' into PHP-7.1Joe Watkins2017-01-221-2/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fix intermittent segfault in GD library
| * | Fix intermittent segfault in GD libraryMitch Hagstrand2017-01-221-2/+2
| | | | | | | | | | | | | | | The gdIOCtx struct should be zero filled with ecalloc. emalloc does not zero fill the struct.
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2017-01-215-7/+21
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fix #73968: Premature failing of XBM reading
| * | Fix #73968: Premature failing of XBM readingChristoph M. Becker2017-01-214-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2017-01-176-2/+47
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.0: Fix #73869: Signed Integer Overflow gd_io.c Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()
| * | Merge branch 'PHP-5.6' into PHP-7.0Anatol Belski2017-01-176-2/+47
| |\ \ | | |/ | | | | | | | | | | | | * PHP-5.6: Fix #73869: Signed Integer Overflow gd_io.c Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()
| | * Fix #73869: Signed Integer Overflow gd_io.cChristoph M. Becker2017-01-174-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| | * Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()Christoph M. Becker2017-01-173-2/+24
| | | | | | | | | | | | | | | | | | | | | 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)
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2017-01-102-217/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fix #73893: A hidden danger of death cycle in a function of gd
| * | Fix #73893: A hidden danger of death cycle in a function of gdChristoph M. Becker2017-01-102-217/+0
| | | | | | | | | | | | We remove the unused, but potentially dangerous functions.
| * | Update copyright headers to 2017Sammy Kaye Powers2017-01-044-4/+4
| | |
* | | Update copyright headers to 2017Sammy Kaye Powers2017-01-044-4/+4
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Stanislav Malyshev2016-11-272-1/+39
|\ \ \ | |/ / | | | | | | | | | * PHP-7.0: Fix #73549: Use after free when stream is passed to imagepng