| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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>.
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| |
| | |
The stack allocated color map buffers were not zeroed before usage, and
so undefined palette indexes could cause information leakage.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Fix incorrect parameter count for imagepng function
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
The gdIOCtx struct should be zero filled with ecalloc.
emalloc does not zero fill the struct.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
| |
| |
| |
| | |
* PHP-5.6:
Fix #73869: Signed Integer Overflow gd_io.c
Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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)
|
| |
| |
| |
| |
| |
| |
| | |
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)
|
| |
| |
| |
| | |
We remove the unused, but potentially dangerous functions.
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-5.6:
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.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
This test is not supposed to work with JIS-mapped Japanese font support
enabled.
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
We must not allow negative color values be passed to
gdImageFillToBorder(), because that can lead to infinite recursion
since the recursion termination condition will not necessarily be met.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of rolling our own bounds check we use clip_1d() as it's done
in gdImageLine() and in external libgd. We must not pass the image
width and height, respectively, but rather the largest ordinate value
that is allowed to be accessed, i.e. width-1 and height-1,
respectively.
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* phpsec/PHP-7.0.13:
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 version
set versions
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We must not allow negative color values be passed to
gdImageFillToBorder(), because that can lead to infinite recursion
since the recursion termination condition will not necessarily be met.
(cherry picked from commit 863d37ea66d5c960db08d6f4a2cbd2518f0f80d1)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead of rolling our own bounds check we use clip_1d() as it's done
in gdImageLine() and in external libgd. We must not pass the image
width and height, respectively, but rather the largest ordinate value
that is allowed to be accessed, i.e. width-1 and height-1,
respectively.
(cherry picked from commit 6499581af76cfe986e12330faabb3a7c36d45ffc)
|
|\ \ \ \
| |/ / /
|/| / /
| |/ / |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
This issue has actually already been fixed with commit 46f2c690. We're
adding a regression test and a NEWS entry, and also port the fix in
gdImageCropThreshold() from libgd:
* <https://github.com/libgd/libgd/commit/b347e034>
* <https://github.com/libgd/libgd/commit/46f2c690>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| | |
We make sure to never pass a negative `rlen` as size to memcpy().
Cf. <https://github.com/libgd/libgd/commit/53110871>.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
The color components are supposed to be in range 0..255, so we must not
cast them to `signed char`, what can be the default for `char`.
Port of <https://github.com/libgd/libgd/commit/77c8d359>.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
We must not permanently change the interpolation method, but rather
have to restore the old method after we're done with scaling the image.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
We port the respective fixes <https://github.com/libgd/libgd/commit/eca37d620>
and <https://github.com/libgd/libgd/commit/837b7327> to our bundled libgd.
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The recently introduced test_image_equals_file() doesn't properly work for
palette images, because in this case only the palette indexes are compared,
what can lead to false positives and negatives as shown in the added test.
To fix that we convert palette images to truecolor, what is supposed to be
faster than calling imagecolorsforindex() for each pixel.
We furthermore rely on PHP's refcounting to free unused images; after all,
this is not C.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
We must not apply the format correction twice for truecolor images.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
Obviously, there was a bad merge.
|