From 89bf354b9175794972733c0940adceb225a88728 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 15 Nov 2014 16:24:25 +0100 Subject: Fix segfault when checking peer addresses This segfault would occur when a peer with a static IP address (e.i. not a hostname resolved via DNS) is read, and any other peer after that. --- src/protocols/ec25519_fhmqvc/handshake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/protocols/ec25519_fhmqvc/handshake.c') diff --git a/src/protocols/ec25519_fhmqvc/handshake.c b/src/protocols/ec25519_fhmqvc/handshake.c index 8563ba2..7c11912 100644 --- a/src/protocols/ec25519_fhmqvc/handshake.c +++ b/src/protocols/ec25519_fhmqvc/handshake.c @@ -456,7 +456,7 @@ static fastd_peer_t * find_key(const uint8_t key[PUBLICKEYBYTES], const fastd_pe continue; } - if (fastd_peer_owns_address(peer, address)) { + if (address && fastd_peer_owns_address(peer, address)) { errno = EPERM; return NULL; } -- cgit v1.2.3