diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-11-02 13:53:09 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-11-02 14:05:01 +0100 |
commit | 7d96dcac2c6ce177a88ac9f15849cb499bf446bb (patch) | |
tree | d1056334a333638f55ffcdd0acde277d5b4e0ee6 /ext/reflection/php_reflection.c | |
parent | 4d067d811d8323d5293a43fb48d546421e082ecb (diff) | |
download | php-git-7d96dcac2c6ce177a88ac9f15849cb499bf446bb.tar.gz |
Fix #55005: imagepolygon num_points requirement
We actually have to check `$num_points` instead of `2*count($points)`,
because the latter may be greater than the former, but not all elements
of `$points` are guaranteed to be used. This allowed to pass arrays
with excess elements to draw polygons with less than three vertices.
While the current implementation of `gdImagePolygon()` and friends
would allow us to draw monogons and digons, we don't allow that
anymore, because the respective drawing primitives work slightly
different (e.g. drawing lines support anti-aliasing, but drawing
general polygons does not).
To minimize the BC break, we do not fix this longstanding issue for PHP
7, but target PHP 8 only.
Diffstat (limited to 'ext/reflection/php_reflection.c')
0 files changed, 0 insertions, 0 deletions