| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
* PHP-7.4:
Fix potential integer overflow detected by oss-fuzz
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fix potential integer overflow detected by oss-fuzz
|
| | |
| | |
| | |
| | |
| | |
| | | |
We port the respective fix from upstream[1].
[1] <https://github.com/libgd/libgd/commit/9ed642764cf0b4585d135eb738812a43265cb2d3>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of returning long and then casting to void.
This fixes a build warning on Ubuntu 20.04.
Closes GH-5742.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79676: imagescale adds black border with IMG_BICUBIC
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #79676: imagescale adds black border with IMG_BICUBIC
|
| | |
| | |
| | |
| | |
| | | |
We have to loop over all image pixels to avoid the black border. This
is also done in external libgd in `_gdScaleOneAxis` and `_gdScalePass`.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79615: Wrong GIF header written in GD GIFEncode
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #79615: Wrong GIF header written in GD GIFEncode
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The color resolution is expected in bits 4-6 of the packed fields byte
of the logical screen descriptor (byte 10 of the GIF data stream),
according to the specification[1], section 18.
[1] <https://www.w3.org/Graphics/GIF/spec-gif89a.txt>
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5377
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As seen in the gdImageRotateBicubicFixed() function the same setup
occurs but it uses signed integers, therefore we use also use
signed integers in gdImageRotateBilinear()
Moreover, these two functions have been removed upstream in
https://github.com/libgd/libgd/commit/bd6d2e101f6f1df106d1cd2e2dc8058a5538109b
therefore we should also mimic upstream and remove them...
Thanks to @cmb69 for pointing it out.
|
| | |
| | |
| | |
| | | |
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While `imagesetinterpolation()` is available as of PHP 5.5.0,
there is no according getter function, so users would have to track the
current interpolation method manually.
To remedy this, we introduce `imagegetinterpolation()` as thin wrapper
for `gdImageGetInterpolationMethod()` (which has been introduced with
libgd 2.1.1), and use `im->interpolation_id` as fallback for older
libgd. Since our bundled libgd does not yet have this function, we add
it.
We also simplify the recently introduced bug79068.phpt, where it is
sufficient to check that the interpolation method has not been changed.
|
| | |
| | |
| | |
| | | |
These values are already set via the initializers.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This has been reported to upstream[1], but since ext/gd never calls
`gdTransformAffineCopy()` for a palette image, it is not a bug for PHP.
Therefore we apply the fix to master only.
[1] <https://github.com/libgd/libgd/issues/586>
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79068: gdTransformAffineCopy() changes interpolation method
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #79068: gdTransformAffineCopy() changes interpolation method
|
| | |
| | |
| | |
| | |
| | | |
We port
<https://github.com/libgd/libgd/commit/9088591eae437358ee5b929adf82865e37e3001e>.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79067: gdTransformAffineCopy() may use unitialized values
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #79067: gdTransformAffineCopy() may use unitialized values
|
| | |
| | |
| | |
| | |
| | | |
We port
<https://github.com/libgd/libgd/commit/7a06c1669c563917bc48c464521e3de962ddb4e8>.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #78923: Artifacts when convoluting image with transparency
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #78923: Artifacts when convoluting image with transparency
|
| | |
| | |
| | |
| | |
| | |
| | | |
We have to properly initialize `pxl` before using it.
Fix ported from <https://github.com/libgd/libgd/pull/559>.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW
|
| | |\
| | | |
| | | |
| | | |
| | | | |
* PHP-7.2:
Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Apparently, this has not been tested for a long time, and might be a
refactoring relict. Anyhow, we have to pass the context to
`GIFNextPixel` as well.
|
|/ / /
| | |
| | |
| | | |
Closes GH-4732.
|
| | |
| | |
| | |
| | |
| | | |
If we're compiling the bundled libgd, `HAVE_GD_BUNDLED` is set, so
there is no need to check for this macro again.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The check for errno.h has been removed via
50b9ef8d9435d23be40cea7fb484a02e99fdb617
Upstream libgd library is also patched via
https://github.com/libgd/libgd/commit/1e7f93922fb3adf9f131d7e94aa13386062ffe11
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We add PHP bindings for libgd's features to read TGA 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.
Since TGA has no easily recognizable file signature, we don't add TGA
support for imagecreatefromstring() or getimagesize() and friends.
|
| | |
| | |
| | |
| | | |
There doesn't seem to be a corresponding upstream fix for this.
|
| | |
| | |
| | |
| | |
| | | |
This has been fixed upstream in
https://github.com/libgd/libgd/commit/939d49a3a9d1cbcd2a37cea9eac9f9e5e9f9de78.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This has already been fixed upstream in
https://github.com/libgd/libgd/commit/24d352576c024769d18113a28f3be03d54fa1e66
and
https://github.com/libgd/libgd/commit/772d0107a6b00a0d6d7191383fe984f8c018b48c.
|
| | | |
|
| | |
| | |
| | |
| | | |
Matches upstream code.
|
| | |
| | |
| | |
| | |
| | | |
This is a backport of
https://github.com/libgd/libgd/blob/e5502c7a3f1fe60536ec060f0211d97066c006ea/src/gd_jpeg.c.
|
| | |
| | |
| | |
| | |
| | | |
I'm fixing this using (int) casts instead of labs() because this is
what upstream GD does.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Fix function name
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.2:
Fix function name
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
* PHP-7.3:
Update NEWS
Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow
Fix #77973: Uninitialized read in gdImageCreateFromXbm
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
* PHP-7.2:
Update NEWS
Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow
Fix #77973: Uninitialized read in gdImageCreateFromXbm
|
| | |\
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* PHP-7.1:
Update NEWS
Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow
Fix #77973: Uninitialized read in gdImageCreateFromXbm
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We have to ensure that `sscanf()` does indeed read a hex value here,
and bail out otherwise.
|