1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00

Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  NEWS
  Fixed Bug #66901 php-gd 'c_color' NULL pointer dereference
This commit is contained in:
Remi Collet
2014-08-04 10:47:54 +02:00
+6 -1
View File
@@ -31,12 +31,17 @@ gdImagePtr gdImageCreateFromXpm (char *filename)
if (ret != XpmSuccess) {
return 0;
}
number = image.ncolors;
for(i = 0; i < number; i++) {
if (!image.colorTable[i].c_color) {
goto done;
}
}
if (!(im = gdImageCreate(image.width, image.height))) {
goto done;
}
number = image.ncolors;
colors = (int *) safe_emalloc(number, sizeof(int), 0);
for (i = 0; i < number; i++) {
switch (strlen (image.colorTable[i].c_color)) {