fastd: fix segmentation fault with musl >1.1.20

When compiled with musl >1.1.20, fastd will crash in case it can't
resolve a peers hostname. This is due to a changed implementation of
freeaddrinfo in musl 1.1.21 onwards.

This segfault is fixed by not calling freeaddrinfo in case the supplied
pointer is null.

Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
David Bauer
2019-07-25 18:58:03 +02:00
parent ad6ed836a5
commit ed3c3e3c79
2 changed files with 36 additions and 1 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=fastd
PKG_VERSION:=18
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz