Author: nextgens
Date: 2008-08-17 12:47:29 +0000 (Sun, 17 Aug 2008)
New Revision: 21960
Modified:
trunk/freenet/src/freenet/keys/Key.java
Log:
paranoia (needed for plugins)
Modified: trunk/freenet/src/freenet/keys/Key.java
===================================================================
--- trunk/freenet/src/freenet/keys/Key.java 2008-08-17 12:30:39 UTC (rev
21959)
+++ trunk/freenet/src/freenet/keys/Key.java 2008-08-17 12:47:29 UTC (rev
21960)
@@ -123,6 +123,8 @@
}
static Bucket decompress(boolean isCompressed, byte[] output, int
outputLength, BucketFactory bf, int maxLength, short compressionAlgorithm,
boolean shortLength) throws CHKDecodeException, IOException {
+ if(maxLength < 0)
+ throw new IllegalArgumentException("maxlength="+maxLength);
if(isCompressed) {
if(Logger.shouldLog(Logger.MINOR, Key.class))
Logger.minor(Key.class, "Decompressing
"+output.length+" bytes in decode with codec "+compressionAlgorithm);
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs