diff --git a/history.txt b/history.txt index d3fcf2f4ca..1495d99de2 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,8 @@ +2009-03-27 zzz + * Add readme_fr.html + * License splash update + * Catch rare TunnelGatewayMessage AIOOB, root cause unknown + 2009-03-24 zzz * I2PTunnel: - Add some warnings about new features diff --git a/router/java/src/net/i2p/data/i2np/TunnelGatewayMessage.java b/router/java/src/net/i2p/data/i2np/TunnelGatewayMessage.java index f611c32138..8fc7c9fd9e 100644 --- a/router/java/src/net/i2p/data/i2np/TunnelGatewayMessage.java +++ b/router/java/src/net/i2p/data/i2np/TunnelGatewayMessage.java @@ -75,6 +75,11 @@ protected int writeMessageBody(byte out[], int curIndex) throws I2NPMessageExcep } DataHelper.toLong(out, curIndex, 2, _msgData.length); curIndex += 2; + // where is this coming from? + if (curIndex + _msgData.length > out.length) { + _log.log(Log.ERROR, "output buffer too small idx: " + curIndex + " len: " + _msgData.length + " outlen: " + out.length); + throw new I2NPMessageException("Too much data to write out (id=" + _tunnelId + " data=" + _msg + ")"); + } System.arraycopy(_msgData, 0, out, curIndex, _msgData.length); curIndex += _msgData.length; return curIndex; diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index c1d6bdf7c6..510adb6dea 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -17,7 +17,7 @@ public class RouterVersion { public final static String ID = "$Revision: 1.548 $ $Date: 2008-06-07 23:00:00 $"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 10; + public final static long BUILD = 11; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("Router ID: " + RouterVersion.ID);