summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-06-16 22:50:32 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-06-16 22:50:32 +0000
commit353e07f57b4d3cfcaa665464c08be506b47575d5 (patch)
tree9cf670a69e5534dc52d85a4dd25c8b0d4a35777d
parentcd8adc0cf2556905886198aef6e49e670f7251ed (diff)
downloadphp-git-353e07f57b4d3cfcaa665464c08be506b47575d5.tar.gz
Fixed memory corruption.
-rw-r--r--ext/gd/libgd/gdxpm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/gd/libgd/gdxpm.c b/ext/gd/libgd/gdxpm.c
index 5663837aee..cdfe63c2cf 100644
--- a/ext/gd/libgd/gdxpm.c
+++ b/ext/gd/libgd/gdxpm.c
@@ -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;