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:
> * toad at freenetproject.org <toad at freenetproject.org> [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$
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080209/50fed422/attachment.pgp>