]> granicus.if.org Git - php/commit
Fix #77198: auto cropping has insufficient precision
authorChristoph M. Becker <cmbecker69@gmx.de>
Sun, 25 Nov 2018 14:41:27 +0000 (15:41 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sun, 25 Nov 2018 14:41:27 +0000 (15:41 +0100)
commitb47b8886dd17d080c74c401f7893ba9f4ccb83d3
treed1534664c9716cf9ec25639817d0fd2e53d5901b
parentff02d509099b0e3788fe99a48c784f47ca47c61b
Fix #77198: auto cropping has insufficient precision

We apply the upstream patch[1], and also fix the erroneous bailout at
the end of `gdImageAutoCrop()`, since `crop.x` and `crop.y` may very
well be zero.

[1] <https://github.com/libgd/libgd/commit/bda85aaeeb1d7467d92c892ba4c30eaa53d7a6d4>
NEWS
ext/gd/libgd/gd_crop.c
ext/gd/tests/bug77198_auto.phpt [new file with mode: 0644]
ext/gd/tests/bug77198_threshold.phpt [new file with mode: 0644]