Author: j16sdiz
Date: 2009-03-01 07:25:00 +0000 (Sun, 01 Mar 2009)
New Revision: 25866

Modified:
   trunk/freenet/src/freenet/clients/http/filter/PNGFilter.java
Log:
Better error reporting on extra data in PNG file

It was throwing java.io.EOFException error.
pngcheck reports "additional data after IEND chunk" for this kind of file

Modified: trunk/freenet/src/freenet/clients/http/filter/PNGFilter.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/filter/PNGFilter.java        
2009-02-27 18:39:50 UTC (rev 25865)
+++ trunk/freenet/src/freenet/clients/http/filter/PNGFilter.java        
2009-03-01 07:25:00 UTC (rev 25866)
@@ -272,7 +272,7 @@
                                }
                                lastChunkType = chunkTypeString;
                        }
-                       if(finished && dis.available() > 0 && output == null)
+                       if(hasSeenIEND && dis.available() > 0 && output == null)
                                throw new IOException("IEND not last chunk");
                        
                        dis.close();

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to