]> granicus.if.org Git - php/commitdiff
Fixed memory corruption.
authorIlia Alshanetsky <iliaa@php.net>
Thu, 16 Jun 2005 22:50:32 +0000 (22:50 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 16 Jun 2005 22:50:32 +0000 (22:50 +0000)
ext/gd/libgd/gdxpm.c

index 5663837aeec713c3c647a2249ceff3534eec606e..cdfe63c2cf7f9df6344e4a6a9d8fce905a4fce6d 100644 (file)
@@ -46,10 +46,10 @@ gdImagePtr gdImageCreateFromXpm (char *filename)
                                buf[0] = image.colorTable[i].c_color[1];
                                red = strtol(buf, NULL, 16);
 
-                               buf[0] = image.colorTable[i].c_color[3];
+                               buf[0] = image.colorTable[i].c_color[2];
                                green = strtol(buf, NULL, 16);
 
-                               buf[0] = image.colorTable[i].c_color[5];
+                               buf[0] = image.colorTable[i].c_color[3];
                                blue = strtol(buf, NULL, 16);
                                break;