From e313da254cf1b920c21f93f9d3200293a2c38433 Mon Sep 17 00:00:00 2001 From: jrandom Date: Sat, 27 Aug 2005 22:46:22 +0000 Subject: [PATCH] 2005-08-27 jrandom * Minor logging and optimization tweaks in the router and SDK * Use ISO-8859-1 in the XML files (thanks redzara!) * The consolePassword config property can now be used to bypass the router console's nonce checking, allowing CLI restarts --- router/java/src/net/i2p/data/i2np/DatabaseStoreMessage.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/router/java/src/net/i2p/data/i2np/DatabaseStoreMessage.java b/router/java/src/net/i2p/data/i2np/DatabaseStoreMessage.java index 23e6ec6d3..add6c9e5c 100644 --- a/router/java/src/net/i2p/data/i2np/DatabaseStoreMessage.java +++ b/router/java/src/net/i2p/data/i2np/DatabaseStoreMessage.java @@ -156,11 +156,13 @@ public class DatabaseStoreMessage extends I2NPMessageImpl { int compressedSize = (int)DataHelper.fromLong(data, curIndex, 2); curIndex += 2; - byte decompressed[] = DataHelper.decompress(data, curIndex, compressedSize); try { + byte decompressed[] = DataHelper.decompress(data, curIndex, compressedSize); _info.readBytes(new ByteArrayInputStream(decompressed)); } catch (DataFormatException dfe) { throw new I2NPMessageException("Error reading the routerInfo", dfe); + } catch (IOException ioe) { + throw new I2NPMessageException("Compressed routerInfo was corrupt", ioe); } } else { throw new I2NPMessageException("Invalid type of key read from the structure - " + _type);