加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-sd-bus-do-not-pass-NULL-when-received-message-with-i.patch 1.58 KB
一键复制 编辑 原始数据 按行查看 历史
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化