r26599 - trunk/plugins/KeyExplorer

[email protected]
Newsgroups gmane.network.freenet.cvs,gmane.spam.detected
Message-ID <[email protected]>
Author: saces
Date: 2009-04-07 10:03:45 +0000 (Tue, 07 Apr 2009)
New Revision: 26599

Modified:
   trunk/plugins/KeyExplorer/VerySimpleGet.java
Log:
add TODO, comments

Modified: trunk/plugins/KeyExplorer/VerySimpleGet.java
===================================================================
--- trunk/plugins/KeyExplorer/VerySimpleGet.java	2009-04-07 08:02:12 UTC (rev 26598)
+++ trunk/plugins/KeyExplorer/VerySimpleGet.java	2009-04-07 10:03:45 UTC (rev 26599)
@@ -87,8 +87,14 @@
 	private Bucket extract(ClientKeyBlock block, ClientContext context) {
 		Bucket tempdata;
 		try {
-			// FIXME What is the maximum size of an decompressed 32K chunk?
-			tempdata = block.decode(context.tempBucketFactory, 1024 * 1024,
+			// TODO this: make max size a parameter (4MB hardcoded for now)
+			// TODO KeyExplorer: ask/warn the user before displaying browser bombs.
+			// FIXME
+			//   What is the maximum size of an decompressed 32K chunk?
+			//   Hah, 2GB is the max insertsize for a compressed single chunk,
+			//   its a memory/browser bomb!
+			//   The hexdump can be ~4x in size! (8GB+a few K for surrounding html)
+			tempdata = block.decode(context.tempBucketFactory, 4 * 1024 * 1024,
 					false);
 		} catch (KeyDecodeException e1) {
 			if (Logger.shouldLog(Logger.MINOR, this))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.