summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/gd_interpolation.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gd/libgd/gd_interpolation.c')
-rw-r--r--ext/gd/libgd/gd_interpolation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index 65e2360776..efb584c1e4 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -2154,7 +2154,7 @@ gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, in
{
const int angle_rounded = (int)floor(angle * 100);
- if (bgcolor < 0) {
+ if (bgcolor < 0 || bgcolor >= gdMaxColors) {
return NULL;
}