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.List;
import java.util.StringTokenizer;
import java.lang.IndexOutOfBoundsException;
import net.i2p.I2PAppContext;
import net.i2p.client.streaming.I2PSocket;
@ -277,9 +278,14 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
if(field[0].charAt(0)==':')
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
// Allow numerical responses

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
* More aggressive tunnel throttling as we approach our bandwidth limit,

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
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 long BUILD = 2;
public final static long BUILD = 3;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);