1 Star 0 Fork 76

zhanghua/rpm

forked from src-openEuler/rpm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-fix-zstd-magic.patch 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
Liquor 提交于 2021-01-11 11:10 . backport patches from upstream
From c464f1ece501346da11ed7582b8d46682363a285 Mon Sep 17 00:00:00 2001
From: Thierry Vignaud <tvignaud@redhat.com>
Date: Mon, 23 Dec 2019 16:51:49 +0100
Subject: [PATCH] fix zstd magic
I spot it while adding support for zstd compressed metadata in
URPM/urpmi, which was broken by this typo
typo introduced in commit 3684424fe297c996bb05bb64631336fa2903df12
---
rpmio/rpmfileutil.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c
index bda97adf1..84ee34f4d 100644
--- a/rpmio/rpmfileutil.c
+++ b/rpmio/rpmfileutil.c
@@ -188,7 +188,7 @@ int rpmFileIsCompressed(const char * file, rpmCompressedMagic * compressed)
(magic[4] == 0x5a) && (magic[5] == 0x00)) {
/* new style xz (lzma) with magic */
*compressed = COMPRESSED_XZ;
- } else if ((magic[0] == 0x28) && (magic[1] == 0x85) &&
+ } else if ((magic[0] == 0x28) && (magic[1] == 0xB5) &&
(magic[2] == 0x2f) ) {
*compressed = COMPRESSED_ZSTD;
} else if ((magic[0] == 'L') && (magic[1] == 'Z') &&
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhanghua1831/rpm.git
git@gitee.com:zhanghua1831/rpm.git
zhanghua1831
rpm
rpm
master

搜索帮助