代码拉取完成,页面将自动刷新
同步操作将从 OpenCloudOS Stream/libarchive 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 17d9d73ee92eeb1a08b0a56659d010d8120af33a Mon Sep 17 00:00:00 2001
From: Wei-Cheng Pan <legnaleurc@gmail.com>
Date: Fri, 26 Apr 2024 13:58:34 +0900
Subject: [PATCH] fix: OOB in rar delta filter
---
libarchive/archive_read_support_format_rar.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c
index 79669a8f4..619ee81e2 100644
--- a/libarchive/archive_read_support_format_rar.c
+++ b/libarchive/archive_read_support_format_rar.c
@@ -3612,7 +3612,15 @@ execute_filter_delta(struct rar_filter *filter, struct rar_virtual_machine *vm)
{
uint8_t lastbyte = 0;
for (idx = i; idx < length; idx += numchannels)
+ {
+ /*
+ * The src block should not overlap with the dst block.
+ * If so it would be better to consider this archive is broken.
+ */
+ if (src >= dst)
+ return 0;
lastbyte = dst[idx] = lastbyte - *src++;
+ }
}
filter->filteredblockaddress = length;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。