On Sunday 17 August 2008 19:31, [EMAIL PROTECTED] wrote: > Author: nextgens > Date: 2008-08-17 18:31:15 +0000 (Sun, 17 Aug 2008) > New Revision: 21977 > > Modified: > trunk/freenet/src/freenet/support/io/LineReadingInputStream.java > Log: > bug #2501: maybe fix the issue for real > > Modified: trunk/freenet/src/freenet/support/io/LineReadingInputStream.java > =================================================================== > --- trunk/freenet/src/freenet/support/io/LineReadingInputStream.java 2008-08-17 18:24:10 UTC (rev 21976) > +++ trunk/freenet/src/freenet/support/io/LineReadingInputStream.java 2008-08-17 18:31:15 UTC (rev 21977) > @@ -33,11 +33,10 @@ > > byte[] buf = new byte[Math.max(Math.min(128, maxLength), > Math.min(1024, bufferSize))]; > int ctr = 0; > - mark((maxLength+1)*2); // Might be more than maxLengh if we use > utf8 > + mark(Integer.MAX_VALUE); // Might be more than maxLengh if we > use utf8
How can it EVER be more than maxLength + 2 ? (\r\n) All these parameters are in bytes afaics. Some impl's are surely going to throw if you do mark(Integer.MAX_VALUE). Do we ever reset the mark? How do you reset the mark? AFAICS if you don't it will cause it to keep on buffering forever and then OOM, no?
pgpfw48bHrXrD.pgp
Description: PGP signature
_______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
