代码拉取完成,页面将自动刷新
From 1e5d36e31edc7a46d3cea0c1e65941f9dc753fc3 Mon Sep 17 00:00:00 2001
From: lingsheng <lingsheng@huawei.com>
Date: Fri, 18 Dec 2020 10:52:36 +0800
Subject: [PATCH] Add attributes file nodesize check
---
tsk/fs/hfs.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tsk/fs/hfs.c b/tsk/fs/hfs.c
index 3acc7ff..2f513cd 100644
--- a/tsk/fs/hfs.c
+++ b/tsk/fs/hfs.c
@@ -3922,6 +3922,18 @@ hfs_load_extended_attrs(TSK_FS_FILE * fs_file,
return 1;
}
+ // Is the Attributes file nodesize valid?
+ // byte size of each node(512..32768)
+ if (attrFile.nodeSize < 512 || attrFile.nodeSize > 32768) {
+ if (tsk_verbose)
+ tsk_fprintf(stderr,
+ "hfs_load_extended_attrs: Attributes file nodesize is invalid\n");
+ close_attr_file(&attrFile);
+ *isCompressed = FALSE;
+ *cmpType = 0;
+ return 0;
+ }
+
// A place to hold one node worth of data
nodeData = (uint8_t *) malloc(attrFile.nodeSize);
if (nodeData == NULL) {
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。