Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  fix possible NULL deref
This commit is contained in:
Pierre Joye 2013-04-09 10:09:36 +02:00
commit aab5659357

View File

@ -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++) {