--- php-4.1.1/ext/standard/image.c~ Thu Feb 14 15:40:36 2002 +++ php-4.1.1/ext/standard/image.c Thu Feb 14 15:40:36 2002 @@ -323,7 +323,9 @@ unsigned int marker; char tmp[2]; unsigned char a[4]; - + unsigned short skip; + unsigned char *buffer; + for (;;) { marker = php_next_marker(socketd, fp, issock); switch (marker) { @@ -349,7 +351,12 @@ result->height = (((unsigned short) a[ 0 ]) << 8) + ((unsigned short) a[ 1 ]); result->width = (((unsigned short) a[ 2 ]) << 8) + ((unsigned short) a[ 3 ]); result->channels = FP_FGETC(socketd, fp, issock); - + /* skip component specification parameters */ + skip = result-> channels *3; + buffer = emalloc(skip); + FP_FREAD(buffer, (long) skip, socketd, fp, issock); + efree(buffer); + if (! info) /* if we don't want an extanded info -> return */ return result; } else {