2006-03-03 Complication

* Explicit check for an index out of bounds exception while parsing
      an inbound IRC command (implicit check was there already)
This commit is contained in:
complication
2006-03-04 03:04:06 +00:00
committed by zzz
parent 2c6d953359
commit e62135eacc
3 changed files with 16 additions and 6 deletions

View File

@ -5,6 +5,7 @@ import java.net.Socket;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.lang.IndexOutOfBoundsException;
import net.i2p.I2PAppContext; import net.i2p.I2PAppContext;
import net.i2p.client.streaming.I2PSocket; import net.i2p.client.streaming.I2PSocket;
@ -278,7 +279,12 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
if(field[0].charAt(0)==':') if(field[0].charAt(0)==':')
idx++; idx++;
command = field[idx++]; try { command = field[idx++]; }
catch (IndexOutOfBoundsException ioobe) // wtf, server sent borked command?
{
_log.warn("Dropping defective message: index out of bounds while extracting command.");
return null;
}
idx++; //skip victim idx++; //skip victim

View File

@ -1,4 +1,8 @@
$Id: history.txt,v 1.423 2006/02/27 22:55:18 zzz Exp $ $Id: history.txt,v 1.424 2006/03/01 18:01:20 jrandom Exp $
2006-03-03 Complication
* Explicit check for an index out of bounds exception while parsing
an inbound IRC command (implicit check was there already)
2006-03-01 jrandom 2006-03-01 jrandom
* More aggressive tunnel throttling as we approach our bandwidth limit, * More aggressive tunnel throttling as we approach our bandwidth limit,

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
* *
*/ */
public class RouterVersion { public class RouterVersion {
public final static String ID = "$Revision: 1.364 $ $Date: 2006/02/27 22:55:19 $"; public final static String ID = "$Revision: 1.365 $ $Date: 2006/03/01 18:01:24 $";
public final static String VERSION = "0.6.1.12"; public final static String VERSION = "0.6.1.12";
public final static long BUILD = 2; public final static long BUILD = 3;
public static void main(String args[]) { public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID); System.out.println("Router ID: " + RouterVersion.ID);