aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2024-02-01 14:20:28 +0000
committerKhem Raj <raj.khem@gmail.com>2024-02-01 08:17:39 -0800
commitbb4884b416baea2e25f66131db1b01b511fa575c (patch)
tree32455479be68640921ff3e4136b1351570a0139f /meta-networking
parentf0512636fdaae0791f9f9708d18773aa56bec3e8 (diff)
downloadmeta-openembedded-contrib-bb4884b416baea2e25f66131db1b01b511fa575c.tar.gz
mdns: Fix SIGSEGV during DumpStateLog()
DumpStateLog() calls LogMsgWithLevelv() with category == NULL, avoid crashing in this case. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch30
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns_2200.60.25.0.4.bb1
2 files changed, 31 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch b/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch
new file mode 100644
index 0000000000..4b0227f1dc
--- /dev/null
+++ b/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch
@@ -0,0 +1,30 @@
+From 14cc53bb09a3d8adf301f3842c765598467e63e1 Mon Sep 17 00:00:00 2001
+From: Alex Kiernan <alex.kiernan@gmail.com>
+Date: Thu, 1 Feb 2024 14:07:03 +0000
+Subject: [PATCH] Fix SIGSEGV during DumpStateLog()
+
+DumpStateLog() calls LogMsgWithLevelv() with category == NULL, avoid
+crashing in this case.
+
+Upstream-Status: Inactive-Upstream [Upstream does not take patches]
+Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+---
+ mDNSShared/mDNSDebug.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mDNSShared/mDNSDebug.c b/mDNSShared/mDNSDebug.c
+index 7a4ca19eff6d..d449dde320f6 100644
+--- a/mDNSShared/mDNSDebug.c
++++ b/mDNSShared/mDNSDebug.c
+@@ -71,7 +71,7 @@ mDNSlocal void LogMsgWithLevelv(os_log_t category, os_log_type_t level, const ch
+ mDNSlocal void LogMsgWithLevelv(const char *category, mDNSLogLevel_t level, const char *format, va_list args)
+ {
+ // Do not print the logs if the log category is MDNS_LOG_CATEGORY_DISABLED.
+- if (strcmp(category, MDNS_LOG_CATEGORY_DISABLED) == 0)
++ if (category && strcmp(category, MDNS_LOG_CATEGORY_DISABLED) == 0)
+ {
+ return;
+ }
+--
+2.39.0
+
diff --git a/meta-networking/recipes-protocols/mdns/mdns_2200.60.25.0.4.bb b/meta-networking/recipes-protocols/mdns/mdns_2200.60.25.0.4.bb
index a009ae0c6e..09af3d5ae3 100644
--- a/meta-networking/recipes-protocols/mdns/mdns_2200.60.25.0.4.bb
+++ b/meta-networking/recipes-protocols/mdns/mdns_2200.60.25.0.4.bb
@@ -24,6 +24,7 @@ SRC_URI = "git://github.com/apple-oss-distributions/mDNSResponder;protocol=https
file://mdns.service \
file://0015-Add-missing-limits.h.patch \
file://0001-Handle-interface-without-ifa_addr.patch \
+ file://0001-Fix-SIGSEGV-during-DumpStateLog.patch \
"
SRCREV = "8acabead9ae56551011172d6835822a89c5298d6"