Permalink
Browse files

fix null deref

  • Loading branch information...
1 parent 1b60c18 commit 4d4adf47e0a31f56e7c2ecf777895de3d70b05ea @pierrejoye pierrejoye committed Apr 9, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 ext/gd/libgd/gd_rotate.c
View
@@ -262,12 +262,13 @@ gdImagePtr gdImageRotate180 (gdImagePtr src, int ignoretransparent)
f = gdImageGetPixel;
}
dst = gdImageCreateTrueColor(src->sx, src->sy);
- 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 4d4adf4

Please sign in to comment.