From a3459bc67802779b7c2c3aa17ef6d6f2030c9d15 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 3 May 2012 00:01:36 +0200 Subject: Critical fix: ignore disabled peers when searching peer key to avoid NULL dereference --- src/protocol_ec25519_fhmqvc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/protocol_ec25519_fhmqvc.c b/src/protocol_ec25519_fhmqvc.c index fd4676f..659b4d3 100644 --- a/src/protocol_ec25519_fhmqvc.c +++ b/src/protocol_ec25519_fhmqvc.c @@ -506,6 +506,9 @@ static const fastd_peer_config* match_sender_key(fastd_context *ctx, const fastd if (!peer_conf || fastd_peer_config_is_floating(peer_conf) || fastd_peer_config_is_dynamic(peer_conf)) { fastd_peer_config *config; for (config = ctx->conf->peers; config; config = config->next) { + if (!config->enabled || !config->protocol_config) + continue; + if (!fastd_peer_config_is_floating(config) && !fastd_peer_config_matches_dynamic(config, address)) continue; -- cgit v1.2.3