diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java index 64343f6358..ce0ef76313 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java @@ -620,11 +620,11 @@ public class I2PTunnel implements Logging, EventDispatcher { } boolean isShared = true; - if (args.length > 1) { + if (args.length > 2) { if ("true".equalsIgnoreCase(args[2].trim())) { isShared = true; - } else if ("false".equalsIgnoreCase(args[1].trim())) { - _log.warn("args[1] == [" + args[1] + "] and rejected explicitly"); + } else if ("false".equalsIgnoreCase(args[2].trim())) { + _log.warn("args[2] == [" + args[2] + "] and rejected explicitly"); isShared = false; } else { // isShared not specified, default to true diff --git a/apps/syndie/java/src/net/i2p/syndie/Sucker.java b/apps/syndie/java/src/net/i2p/syndie/Sucker.java index 39f6d07212..a1717ca57e 100644 --- a/apps/syndie/java/src/net/i2p/syndie/Sucker.java +++ b/apps/syndie/java/src/net/i2p/syndie/Sucker.java @@ -340,6 +340,11 @@ public class Sucker { //System.out.println("html: "+html.substring(i)); int tagLen = findTagLen(html.substring(i)); + if(tagLen<=0) + { + System.out.println("Bad html? ("+html+")"); + break; + } // String htmlTag = html.substring(i,i+tagLen); @@ -477,12 +482,12 @@ public class Sucker { if(s.charAt(i)=='"') { i++; - while(s.charAt(i)!='"') + while(i