1 Star 0 Fork 50

zhongling.h/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0171-bus-message-output-debug-information-about-offset-tr.patch 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:59 . import systemd-239-29.el8.src.rpm
From f6af2bfe4b353b25a61c362c3ada9be06c8f15c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <[email protected]>
Date: Fri, 3 Aug 2018 18:05:27 +0200
Subject: [PATCH] bus-message: output debug information about offset troubles
(cherry picked from commit 0b4775b52747bebf7ecb62062798475629767044)
Resolves: #1696224
---
src/libsystemd/sd-bus/bus-message.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index 153cdf933b..09e72d89dd 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -3845,8 +3845,11 @@ static int build_struct_offsets(
x = size - (n_variable * sz);
offset = m->rindex + x;
- if (offset < start)
+ if (offset < start) {
+ log_debug("For type %s with alignment %zu, message specifies offset %zu which is smaller than previous end %zu + alignment = %zu",
+ t, align, offset, previous, start);
return -EBADMSG;
+ }
} else
/* Fixed size */
offset = start + k;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhonglingh/systemd.git
[email protected]:zhonglingh/systemd.git
zhonglingh
systemd
systemd
a8

搜索帮助