connman: patch segfault on musl

musl > 1.1.21 requires a non-null argument to freeaddrinfo. Fixed upstream so patch can be removed on next release.
This commit is contained in:
kqo 2019-09-22 20:34:12 +00:00 committed by Helmut Pozimski
parent 882335f875
commit 8fed96c2bc
2 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,17 @@
musl > 1.1.21 segfaults on null pointers to freeaddrinfo
diff --git a/gweb/gweb.c b/gweb/gweb.c
index 393afe0a..12fcb1d8 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -1274,7 +1274,8 @@ static bool is_ip_address(const char *host)
addr = NULL;
result = getaddrinfo(host, NULL, &hints, &addr);
- freeaddrinfo(addr);
+ if(!result)
+ freeaddrinfo(addr);
return result == 0;
}

View File

@ -1,7 +1,7 @@
# Template file for 'connman'
pkgname=connman
version=1.37
revision=2
revision=3
build_style=gnu-configure
configure_args="--enable-polkit --enable-client --enable-pie --enable-ethernet
--enable-wifi --enable-bluetooth --enable-loopback --enable-nmcompat