加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-valgrind-errors-of-uninitialised-byte-during-cal.patch 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
hexiaowen 提交于 2019-09-30 10:57 . Package init
From 84d24281f4cfac9597ee9184a30cb1aa91d8a86e Mon Sep 17 00:00:00 2001
From: Tamas Lengyel <tamas.k.lengyel@gmail.com>
Date: Fri, 31 May 2013 12:20:57 +0000
Subject: [PATCH 10/38] fix valgrind errors of uninitialised byte during call
to nfq_unbind_pf
Valgrind generates error reports during a call
to the nfq_unbind_pf function:
==00:00:00:08.662 22111== 4 errors in context 1 of 1:
==00:00:00:08.662 22111== Syscall param socketcall.sendto(msg) points
to uninitialised byte(s)
...
==00:00:00:08.662 22111== Uninitialised value was created by a stack allocation
==00:00:00:08.662 22111== at 0x679C30B: __build_send_cfg_msg
(libnetfilter_queue.c:178
Signed-off-by: Tamas K Lengyel <tamas.k.lengyel@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
src/libnetfilter_queue.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libnetfilter_queue.c b/src/libnetfilter_queue.c
index 2894ccd..bf944f0 100644
--- a/src/libnetfilter_queue.c
+++ b/src/libnetfilter_queue.c
@@ -186,6 +186,7 @@ __build_send_cfg_msg(struct nfq_handle *h, u_int8_t command,
nfnl_fill_hdr(h->nfnlssh, &u.nmh, 0, AF_UNSPEC, queuenum,
NFQNL_MSG_CONFIG, NLM_F_REQUEST|NLM_F_ACK);
+ cmd._pad = 0;
cmd.command = command;
cmd.pf = htons(pf);
nfnl_addattr_l(&u.nmh, sizeof(u), NFQA_CFG_CMD, &cmd, sizeof(cmd));
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化