-11, catch rare AIOOB

This commit is contained in:
zzz
2009-03-27 18:09:46 +00:00
parent 0343e8ffcd
commit fe0d0d6737
3 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -75,6 +75,11 @@ public class TunnelGatewayMessage extends I2NPMessageImpl {
}
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;

View File

@ -17,7 +17,7 @@ import net.i2p.CoreVersion;
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);