]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Fix segfault on 'ipsec stroke up ]' command
authorThomas Egerer <thomas.egerer@secunet.com>
Thu, 29 Jul 2010 11:03:01 +0000 (13:03 +0200)
committerMartin Willi <martin@revosec.ch>
Thu, 29 Jul 2010 12:03:11 +0000 (14:03 +0200)
src/libcharon/plugins/stroke/stroke_control.c

index a03aef69709cc653c94300f19ed7b00a18606774..f64421551cccbc718c038bd3584db6f0e26a5293 100644 (file)
@@ -186,6 +186,11 @@ static void terminate(private_stroke_control_t *this, stroke_msg_t *msg, FILE *o
        }
        else
        {
+               if (!pos)
+               {
+                       DBG1(DBG_CFG, "error parsing string");
+                       return;
+               }
                if (*(pos + 1) == '*')
                {       /* is name[*] */
                        all = TRUE;