4 Star 0 Fork 5

OpenCloudOS Stream/libxcrypt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ac2fea3990a3b0d750d080b055dd21741c14b9c3.patch 773 Bytes
一键复制 编辑 原始数据 按行查看 历史
ocs-bot 提交于 2025-06-03 20:05 +08:00 . - [Type] bugfix
From ac2fea3990a3b0d750d080b055dd21741c14b9c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 15 Jan 2025 12:16:32 +0100
Subject: [PATCH] crypt: Zeroize initialized and reserved data members after
computation.
Fixes #204.
---
lib/crypt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/crypt.c b/lib/crypt.c
index b923c864..6e5aab02 100644
--- a/lib/crypt.c
+++ b/lib/crypt.c
@@ -181,6 +181,8 @@ do_crypt (const char *phrase, const char *setting, struct crypt_data *data)
cint->alg_specific, sizeof cint->alg_specific);
explicit_bzero (data->internal, sizeof data->internal);
+ explicit_bzero (data->reserved, sizeof data->reserved);
+ data->initialized = 0;
}
#if INCLUDE_crypt_rn
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opencloudos-stream/libxcrypt.git
git@gitee.com:opencloudos-stream/libxcrypt.git
opencloudos-stream
libxcrypt
libxcrypt
master

搜索帮助