diff options
| author | Thomas Egerer <thomas.egerer@secunet.com> | 2010-07-29 13:03:01 +0200 |
|---|---|---|
| committer | Martin Willi <martin@revosec.ch> | 2010-07-29 14:03:11 +0200 |
| commit | 5d2e159b417799fba0cf7f4ed7fc358b91f368f5 (patch) | |
| tree | 132e9fa6a9c7bde9069b9fd364e15c1ba7bbe721 /src/libcharon/plugins/stroke | |
| parent | 8f50d06c354cd31fc295afc5598afff4096b5e77 (diff) | |
| download | strongswan-5d2e159b417799fba0cf7f4ed7fc358b91f368f5.tar.bz2 strongswan-5d2e159b417799fba0cf7f4ed7fc358b91f368f5.tar.xz | |
Fix segfault on 'ipsec stroke up ]' command
Diffstat (limited to 'src/libcharon/plugins/stroke')
| -rw-r--r-- | src/libcharon/plugins/stroke/stroke_control.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_control.c b/src/libcharon/plugins/stroke/stroke_control.c index a03aef697..f64421551 100644 --- a/src/libcharon/plugins/stroke/stroke_control.c +++ b/src/libcharon/plugins/stroke/stroke_control.c @@ -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; |
