From: Tobias Brunner Date: Wed, 4 Aug 2010 12:22:48 +0000 (+0200) Subject: Fixed loading of private keys without password. X-Git-Tag: 4.5.0~577 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dca2d89209ade805002df9ea2525887624a302bb;p=thirdparty%2Fstrongswan.git Fixed loading of private keys without password. The chunk storing the password was not correctly initialized, resulting in a segmentation fault when no password was specified in ipsec.secrets. --- diff --git a/src/libcharon/plugins/stroke/stroke_cred.c b/src/libcharon/plugins/stroke/stroke_cred.c index 16fc844ec5..8dd0bb0311 100644 --- a/src/libcharon/plugins/stroke/stroke_cred.c +++ b/src/libcharon/plugins/stroke/stroke_cred.c @@ -955,7 +955,7 @@ static bool load_private(private_stroke_cred_t *this, chunk_t line, int line_nr, { char path[PATH_MAX]; chunk_t filename; - chunk_t secret; + chunk_t secret = chunk_empty; private_key_t *key; err_t ugh = extract_value(&filename, &line);