From bb4732efd69571cb0fcf70e2d588b3e1aca7b66c Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sun, 20 May 2012 14:42:12 +0200 Subject: - fix a backtrace from the market console - Version 0.5.5a --- src/de/blinkt/openvpn/ConfigParser.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/de') diff --git a/src/de/blinkt/openvpn/ConfigParser.java b/src/de/blinkt/openvpn/ConfigParser.java index 5e054c6..4447eaf 100644 --- a/src/de/blinkt/openvpn/ConfigParser.java +++ b/src/de/blinkt/openvpn/ConfigParser.java @@ -258,9 +258,13 @@ public class ConfigParser { if(route.size() >= 3) netmask = route.get(2); String net = route.get(1); - - CIDRIP cidr = new CIDRIP(net, netmask); - routeopt+=cidr.toString() + " "; + try { + CIDRIP cidr = new CIDRIP(net, netmask); + routeopt+=cidr.toString() + " "; + } catch (ArrayIndexOutOfBoundsException aioob) { + throw new ConfigParseError("Could not parse netmask of route " + netmask); + } + } np.mCustomRoutes=routeopt; } -- cgit v1.2.3