Skip to content

Commit

Permalink
-11, catch rare AIOOB
Browse files Browse the repository at this point in the history
  • Loading branch information
zzz committed Mar 27, 2009
1 parent 0343e8f commit fe0d0d6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions history.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 5 additions & 0 deletions router/java/src/net/i2p/data/i2np/TunnelGatewayMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion router/java/src/net/i2p/router/RouterVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fe0d0d6

Please sign in to comment.