diff options
Diffstat (limited to 'meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch')
-rw-r--r-- | meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch | 27 |
1 files changed, 27 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..abf82b1e02 --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/mdns/0001-Fix-SIGSEGV-during-DumpStateLog.patch @@ -0,0 +1,27 @@ +From 2db1f5bc941e4b4cd1721e361a47cfe288b07a76 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; + } |