[strongSwan-dev] [PATCH] Fix segfault on 'ipsec stroke up ]' command
Thomas Egerer
thomas.egerer at secunet.com
Thu Jul 29 13:03:01 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Martin, *,
please consider inclusion of the included patch to avoid
segmentation faults on stroke calls like:
ipsec stroke up ]
Thank you,
Thomas
- ---
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 a03aef6..f644215 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;
- --
1.7.1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkxRX+UACgkQDXd94wpQmdzmuACfVkCk7e9WsHQKtdU2fwwOKy/A
kpYAnRIyCjTCiMkCdsKA/8VSduNB8Vcn
=UD5n
-----END PGP SIGNATURE-----
More information about the Dev
mailing list