From: Tobias Brunner Date: Tue, 13 Dec 2011 12:08:54 +0000 (+0100) Subject: Fixed SIGSEGV when logging peer config matches. X-Git-Tag: 5.0.0~338^2~9^2~230 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6503db2cf3e922f4efbcae113cf9f9fe8e31390;p=thirdparty%2Fstrongswan.git Fixed SIGSEGV when logging peer config matches. --- diff --git a/src/libcharon/config/backend_manager.c b/src/libcharon/config/backend_manager.c index 5fe137ed5d..e7e7a9055c 100644 --- a/src/libcharon/config/backend_manager.c +++ b/src/libcharon/config/backend_manager.c @@ -195,12 +195,13 @@ static id_match_t get_peer_match(identification_t *id, auth_cfg_t *auth; identification_t *candidate; id_match_t match = ID_MATCH_NONE; + char *where = local ? "local" : "remote"; chunk_t data; if (!id) { DBG3(DBG_CFG, "peer config match %s: %d (%N)", - local ? "local" : "remote", ID_MATCH_ANY, id_type_names, ID_ANY); + where, ID_MATCH_ANY, id_type_names, ID_ANY); return ID_MATCH_ANY; } @@ -227,7 +228,7 @@ static id_match_t get_peer_match(identification_t *id, data = id->get_encoding(id); DBG3(DBG_CFG, "peer config match %s: %d (%N -> %#B)", - match, id_type_names, id->get_type(id), &data); + where, match, id_type_names, id->get_type(id), &data); return match; }