| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
* 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>
|
|\ \
| |/
| |
| |
| | |
* 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.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>
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #79068: gdTransformAffineCopy() changes interpolation method
|
| |
| |
| |
| |
| | |
We port
<https://github.com/libgd/libgd/commit/9088591eae437358ee5b929adf82865e37e3001e>.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #79067: gdTransformAffineCopy() may use unitialized values
|
| |
| |
| |
| |
| | |
We port
<https://github.com/libgd/libgd/commit/7a06c1669c563917bc48c464521e3de962ddb4e8>.
|
|\ \
| |/
| |
| |
| | |
* 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.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.
|
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Changes to simplify managing libgd docs a bit:
- Move copyright statement and licensing info to common redistributable
bins file. All previous notices left intact and updated with the
upstream info.
- Remove unsynced and difficult to track README file compared to
upstream README.md file available at https://github.com/libgd/libgd
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This filter is available as of libgd 2.1.0 which is our bare minimum for
external compilation of ext/gd.
The scatter filter works by iterating over all pixels in the image and
shifting them randomly based on two modifier (`plus` and `sub`) values:
dest_x = (int)(x + ((rand() % (plus - sub)) + sub));
dest_y = (int)(y + ((rand() % (plus - sub)) + sub));
Additionally the scatter filter also supports by only shifting pixels where
the current pixel being iterated is one or more colors, allowing the scatter
filter to only effect solid colors in part of an image.
Note, due to the nature of randomness and implementation, pixels who were
shifted ahead of iteration will be shifted once more and therefore the
bottom right of an image may contain a slight scatter effect due to this.
|
| | | |
| | | |
| | | |
| | | | |
This matches the upstream implementation.
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* PHP-7.3:
Fix #77700: Writing truecolor images as GIF ignores interlace flag
|
| |\ \ \
| | |/ /
| | | |
| | | |
| | | | |
* PHP-7.2:
Fix #77700: Writing truecolor images as GIF ignores interlace flag
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We revert the interlace flag related part of commit ff2822a[1], since
contrary to the transparent color, the interlace flag is not retained
by `gdImageCreatePaletteFromTrueColor()`. This also matches upstream
libgd.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=ff2822a82b740edb8ccf307f080bae188c200fb9>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.
A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.
This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.
With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.
Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Even though libgd/libgd#492 is not a relevant bug fix for PHP, since
the binding doesn't use the `gdImage*Ptr()` functions at all, we're
porting the fix to stay in sync here.
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* PHP-7.3:
Fix #77479: imagewbmp() segfaults with very large images
|
| |\ \ \
| | |/ /
| | | |
| | | |
| | | | |
* PHP-7.2:
Fix #77479: imagewbmp() segfaults with very large images
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We must not proceed working with the Wbmp structure, if it hasn't been
allocated.
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* PHP-7.3:
Fix #73614: gdImageFilledArc() doesn't properly draw pies
|
| |\ \ \
| | |/ /
| | | |
| | | |
| | | | |
* PHP-7.2:
Fix #73614: gdImageFilledArc() doesn't properly draw pies
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The fix for PHP bug 43828[1] changed the algorithm from drawing filled
pies from drawing multiple triangles to drawing a single polygon. Due
to quirks of the filled polygon drawing algorithm, we had to filter out
extraneous vertices. This lead, however, to a bug regarding displaced
starting and ending points near 90° and 270° degrees, which we fix by
reinserting these vertices if they had been removed.
This fix is a port of libgd/libgd@1406b1a.
[1] <https://bugs.php.net/bug.php?id=43828>
|