mirror of
https://git.yoctoproject.org/poky
synced 2026-02-09 02:03:04 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
9fc14c7866
commit
485b0dedbb
@@ -0,0 +1,34 @@
|
||||
From f0a8c69971b30ea7ca255bb885fdd1179fa5d298 Mon Sep 17 00:00:00 2001
|
||||
From: Nicola Lunghi <nick83ola@gmail.com>
|
||||
Date: Thu, 23 May 2019 07:55:25 +0100
|
||||
Subject: [PATCH] gweb: fix segfault with musl v1.1.21
|
||||
|
||||
In musl > v1.1.21 freeaddrinfo() implementation changed and
|
||||
was causing a segmentation fault on recent Yocto using musl.
|
||||
|
||||
See this commit:
|
||||
|
||||
https://git.musl-libc.org/cgit/musl/commit/src/network/freeaddrinfo.c?id=d1395c43c019aec6b855cf3c656bf47c8a719e7f
|
||||
|
||||
Upstream-Status: Submitted
|
||||
---
|
||||
gweb/gweb.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
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;
|
||||
}
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -3,6 +3,7 @@ require connman.inc
|
||||
SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
|
||||
file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
|
||||
file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
|
||||
file://0001-gweb-fix-segfault-with-musl-v1.1.21.patch \
|
||||
file://connman \
|
||||
file://no-version-scripts.patch \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user