Skip to content
Browse files

Merge branch 'PHP-5.5'

* PHP-5.5:
  fix possible NULL deref
  • Loading branch information...
2 parents eb7d0ce + 24f1045 commit d0cd04931239f89d5205216e0bebf85a98036c90 @pierrejoye pierrejoye committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 ext/gd/libgd/gd_rotate.c
View
6 ext/gd/libgd/gd_rotate.c
@@ -216,12 +216,13 @@ gdImagePtr gdImageRotate90 (gdImagePtr src, int ignoretransparent)
f = gdImageGetPixel;
}
dst = gdImageCreateTrueColor(src->sy, src->sx);
- dst->transparent = src->transparent;
if (dst != NULL) {
int old_blendmode = dst->alphaBlendingFlag;
dst->alphaBlendingFlag = 0;
+ dst->transparent = src->transparent;
+
gdImagePaletteCopy (dst, src);
for (uY = 0; uY<src->sy; uY++) {
@@ -310,12 +311,13 @@ gdImagePtr gdImageRotate270 (gdImagePtr src, int ignoretransparent)
f = gdImageGetPixel;
}
dst = gdImageCreateTrueColor (src->sy, src->sx);
- dst->transparent = src->transparent;
if (dst != NULL) {
int old_blendmode = dst->alphaBlendingFlag;
dst->alphaBlendingFlag = 0;
+ dst->transparent = src->transparent;
+
gdImagePaletteCopy (dst, src);
for (uY = 0; uY<src->sy; uY++) {

0 comments on commit d0cd049

Please sign in to comment.
Something went wrong with that request. Please try again.