]>
Commit | Line | Data |
---|---|---|
04cc6e9a | 1 | --- php-4.1.1/ext/standard/image.c~ Thu Feb 14 15:40:36 2002 |
2 | +++ php-4.1.1/ext/standard/image.c Thu Feb 14 15:40:36 2002 | |
3 | @@ -323,7 +323,9 @@ | |
4 | unsigned int marker; | |
5 | char tmp[2]; | |
6 | unsigned char a[4]; | |
7 | - | |
8 | + unsigned short skip; | |
9 | + unsigned char *buffer; | |
10 | + | |
11 | for (;;) { | |
12 | marker = php_next_marker(socketd, fp, issock); | |
13 | switch (marker) { | |
14 | @@ -349,7 +351,12 @@ | |
15 | result->height = (((unsigned short) a[ 0 ]) << 8) + ((unsigned short) a[ 1 ]); | |
16 | result->width = (((unsigned short) a[ 2 ]) << 8) + ((unsigned short) a[ 3 ]); | |
17 | result->channels = FP_FGETC(socketd, fp, issock); | |
18 | - | |
19 | + /* skip component specification parameters */ | |
20 | + skip = result-> channels *3; | |
21 | + buffer = emalloc(skip); | |
22 | + FP_FREAD(buffer, (long) skip, socketd, fp, issock); | |
23 | + efree(buffer); | |
24 | + | |
25 | if (! info) /* if we don't want an extanded info -> return */ | |
26 | return result; | |
27 | } else { |