systemd/backport-sd-bus-do-not-pass-NULL-when-received-message-with-i.patch
yangmingtaip 96d52d6f72 backport patches from upstream and add patchs to enhance compatibility and features
(cherry picked from commit c6e3325c5fc233470f4e4292f88eea8c7923de13)
2023-01-16 10:02:05 +08:00

35 lines
1.6 KiB
Diff

From bc3d5f31bf8af840d3f4c1f66ea5d7ec6dcfcb1b Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Thu, 14 Jul 2022 10:53:54 +0900
Subject: [PATCH] sd-bus: do not pass NULL when received message with invalid
type
Fixes #24003.
(cherry picked from commit 3f0dbb0f0c4e3c0013fa5fe54441ca7f969555a7)
(cherry picked from commit e56bfc8a417d1877c25b943b75cd73163246fbf2)
(cherry picked from commit a6aa5b2f7262ba67acfddd6dfa304144639a9ca4)
Conflict:NA
Reference:https://github.com/systemd/systemd/commit/bc3d5f31bf8af840d3f4c1f66ea5d7ec6dcfcb1b
---
src/libsystemd/sd-bus/sd-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index e85a409871..7a58c560d5 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -48,7 +48,7 @@
do { \
sd_bus_message *_mm = (m); \
log_debug("Got message type=%s sender=%s destination=%s path=%s interface=%s member=%s cookie=%" PRIu64 " reply_cookie=%" PRIu64 " signature=%s error-name=%s error-message=%s", \
- bus_message_type_to_string(_mm->header->type), \
+ strna(bus_message_type_to_string(_mm->header->type)), \
strna(sd_bus_message_get_sender(_mm)), \
strna(sd_bus_message_get_destination(_mm)), \
strna(sd_bus_message_get_path(_mm)), \
--
2.27.0