1 Star 0 Fork 14

张攀/dconf

forked from src-openEuler/dconf 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
memset-chunk-date-to-eliminate-discrepancy.patch 733 Bytes
一键复制 编辑 原始数据 按行查看 历史
From e772e3047896fb72d4976e109ca579d567064050 Mon Sep 17 00:00:00 2001
From: yanan <yanan@huawei.com>
Date: Wed, 23 Feb 2022 11:33:48 +0800
Subject: [PATCH] dconf read random contents of memory causing discrepancy,initialize memory to eliminate discrepancy
---
gvdb/gvdb-builder.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gvdb/gvdb-builder.c b/gvdb/gvdb-builder.c
index 2383e60..31e2d8f 100644
--- a/gvdb/gvdb-builder.c
+++ b/gvdb/gvdb-builder.c
@@ -239,6 +239,7 @@ file_builder_allocate (FileBuilder *fb,
chunk->offset = fb->offset;
chunk->size = size;
chunk->data = g_malloc (size);
+ memset(chunk->data, 0, size);
pointer->start = guint32_to_le (fb->offset);
fb->offset += size;
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zppzhangpan/dconf.git
git@gitee.com:zppzhangpan/dconf.git
zppzhangpan
dconf
dconf
master

搜索帮助