Re: cvs: php4 /ext/standard image.c
| From: | Thies C. Arntzen | Date: | Wed, 16 May 2001 06:55:59 +0000 |
| Subject: | Re: cvs: php4 /ext/standard image.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-5770@lists.php.net to get a copy of this message | ||
On Wed, May 16, 2001 at 08:23:24AM +0200, Jani Taskinen wrote:
> On Wed, 16 May 2001, Thies C. Arntzen wrote:
>
> >> {
> >> int c;
> >> -
> >> - /* skip unimportant stuff */
> >> -
> >> - c = FP_FGETC(socketd,fp,issock);
> >> -
> >> - while (c != 0xff) {
> >> - if ((c = FP_FGETC(socketd,fp,issock)) == EOF)
> >> - return M_EOI; /* we hit EOF */
> >> - }
> >>
> >
> > are you sure this is a wise thing to do? this code has been
> > more-or-less taken from the ijg-jpeg and has been in there as
> > long as this (getimagesize) function exists. could you send
> > me a failing sample-image so i could see myself?
>
>
> The way it works after I made this function to accept URLs,
> only removing this (since there can't be any fseek() now) works.
i can see the point - but i still belive this whole change
might break other images! i'm sure this code is in the
ijg-jpeg for a reason.
>
> But if you can come up with better fix, feel free. :)
we would have to buffer the 3 bytes that we have read-ahead.
i don't have the time to do that right now - so lets hope that
this "fix" doesn't break a lot of other JPGs!
re,
tc