summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/connman
diff options
context:
space:
mode:
authorNicola Lunghi <nick83ola@gmail.com>2019-05-23 14:26:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-27 17:06:34 +0100
commit485b0dedbb5f259bced11b4d3499a7cfbc329f83 (patch)
treece72193efe9f33bebbefffd4d87e273495003a9b /meta/recipes-connectivity/connman
parent9fc14c7866298bcde461ac165f86326d571ca89a (diff)
downloadpoky-485b0dedbb5f259bced11b4d3499a7cfbc329f83.tar.gz
connman: fix segfault with musl >v1.1.21
musl > v1.1.21 changed the implementation of the freeaddrinfo() function not allowing anymore to pass null pointers to it. This was causing a segmentation fault in connman. (From OE-Core rev: a9bf875af4a5133e4f0e3039a76b1dfc6d5d1f63) Signed-off-by: Nicola Lunghi <nick83ola@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/connman')
-rw-r--r--meta/recipes-connectivity/connman/connman/0001-gweb-fix-segfault-with-musl-v1.1.21.patch34
-rw-r--r--meta/recipes-connectivity/connman/connman_1.37.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/connman/connman/0001-gweb-fix-segfault-with-musl-v1.1.21.patch b/meta/recipes-connectivity/connman/connman/0001-gweb-fix-segfault-with-musl-v1.1.21.patch
new file mode 100644
index 0000000000..30f1432cd3
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-gweb-fix-segfault-with-musl-v1.1.21.patch
@@ -0,0 +1,34 @@
1From f0a8c69971b30ea7ca255bb885fdd1179fa5d298 Mon Sep 17 00:00:00 2001
2From: Nicola Lunghi <nick83ola@gmail.com>
3Date: Thu, 23 May 2019 07:55:25 +0100
4Subject: [PATCH] gweb: fix segfault with musl v1.1.21
5
6In musl > v1.1.21 freeaddrinfo() implementation changed and
7was causing a segmentation fault on recent Yocto using musl.
8
9See this commit:
10
11 https://git.musl-libc.org/cgit/musl/commit/src/network/freeaddrinfo.c?id=d1395c43c019aec6b855cf3c656bf47c8a719e7f
12
13Upstream-Status: Submitted
14---
15 gweb/gweb.c | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
17
18diff --git a/gweb/gweb.c b/gweb/gweb.c
19index 393afe0a..12fcb1d8 100644
20--- a/gweb/gweb.c
21+++ b/gweb/gweb.c
22@@ -1274,7 +1274,8 @@ static bool is_ip_address(const char *host)
23 addr = NULL;
24
25 result = getaddrinfo(host, NULL, &hints, &addr);
26- freeaddrinfo(addr);
27+ if(!result)
28+ freeaddrinfo(addr);
29
30 return result == 0;
31 }
32--
332.19.1
34
diff --git a/meta/recipes-connectivity/connman/connman_1.37.bb b/meta/recipes-connectivity/connman/connman_1.37.bb
index 2cf904cd85..12650329c5 100644
--- a/meta/recipes-connectivity/connman/connman_1.37.bb
+++ b/meta/recipes-connectivity/connman/connman_1.37.bb
@@ -3,6 +3,7 @@ require connman.inc
3SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ 3SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
4 file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \ 4 file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
5 file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \ 5 file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
6 file://0001-gweb-fix-segfault-with-musl-v1.1.21.patch \
6 file://connman \ 7 file://connman \
7 file://no-version-scripts.patch \ 8 file://no-version-scripts.patch \
8" 9"