Skip to content
Browse files

Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  fix possible NULL deref
  • Loading branch information...
2 parents 1359eaa + aab5659 commit 24f1045d55fa4d3df357b76cf6e35a1407267cf1 @pierrejoye pierrejoye committed Apr 9, 2013
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 24f1045

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