Ai
8 Star 0 Fork 33

src-anolis-os/util-linux

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0101-libblkid-hfs-fix-label-use-fuzzing.patch 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
renbo02 提交于 2024-07-18 15:17 +08:00 . update to util-linux-2.32.1-46.src.rpm
From f16b5e8bb95471a27b52e46f2357168dabba67d5 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 2 Jun 2022 16:02:54 +0200
Subject: libblkid: (hfs) fix label use [fuzzing]
Addresses: https://issues.redhat.com/browse/RHEL-16070
Upstream: http://github.com/util-linux/util-linux/commit/74e48269ee9a15e230e25d0e3d2e50f5b0ba2b04
Reported-by: Thibault Guittet <tguittet@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
---
libblkid/src/superblocks/hfs.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libblkid/src/superblocks/hfs.c b/libblkid/src/superblocks/hfs.c
index 185c42c92..4552c1e6a 100644
--- a/libblkid/src/superblocks/hfs.c
+++ b/libblkid/src/superblocks/hfs.c
@@ -173,7 +173,10 @@ static int probe_hfs(blkid_probe pr, const struct blkid_idmag *mag)
hfs_set_uuid(pr, hfs->finder_info.id, sizeof(hfs->finder_info.id));
- blkid_probe_set_label(pr, hfs->label, hfs->label_len);
+ size = hfs->label_len;
+ if ((size_t) size > sizeof(hfs->label))
+ size = sizeof(hfs->label);
+ blkid_probe_set_label(pr, hfs->label, size);
return 0;
}
--
2.43.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/util-linux.git
git@gitee.com:src-anolis-os/util-linux.git
src-anolis-os
util-linux
util-linux
a8

搜索帮助