No you're not. That code only checks that there was an IEND chunk before the end. It doesn't check that there were no chunks after the IEND chunk.
On Saturday 09 February 2008 13:50, Florent Daignière wrote:
> * [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2008-02-09 12:42:53]:
>
> > Author: toad
> > Date: 2008-02-09 12:42:53 +0000 (Sat, 09 Feb 2008)
> > New Revision: 17740
> >
> > Modified:
> > trunk/freenet/src/freenet/clients/http/filter/PNGFilter.java
> > Log:
> > IEND must be last chunk
> >
> > Modified: trunk/freenet/src/freenet/clients/http/filter/PNGFilter.java
> > ===================================================================
> > --- trunk/freenet/src/freenet/clients/http/filter/PNGFilter.java
2008-02-09 04:54:40 UTC (rev 17739)
> > +++ trunk/freenet/src/freenet/clients/http/filter/PNGFilter.java
2008-02-09 12:42:53 UTC (rev 17740)
> > @@ -231,6 +231,8 @@
> > }
> > lastChunkType = chunkTypeString;
> > }
> > + if(finished && dis.available() > 0)
> > + throw new IOException("IEND not last chunk");
> >
> > dis.close();
> > } finally {
> >
>
> I'm already checking for that using:
> if(dis.available() < 1) {
> if(!(hasSeenIEND && hasSeenIHDR))
> throw new IOException("Missing IEND or IHDR!");
> finished = true;
> }
>
> NextGen$
>
pgpjXfWTzMUiI.pgp
Description: PGP signature
_______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
