1 Star 0 Fork 76

gys/rpm

forked from src-openEuler/rpm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Fix-eiu-sourceURL-info-leak-in-rpmInstall.patch 906 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 084c64d5ea0e1a309d3b57dc95926eb1536d0a7a Mon Sep 17 00:00:00 2001
From: xujing <xujing125@huawei.com>
Date: Thu, 24 Nov 2022 11:43:28 +0800
Subject: [PATCH 1/3] Fix eiu->sourceURL info leak in rpmInstall()
When installing source rpms, eiu->sourceURL info is leaked.
---
lib/rpminstall.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/rpminstall.c b/lib/rpminstall.c
index 097599681..eb68deb4d 100644
--- a/lib/rpminstall.c
+++ b/lib/rpminstall.c
@@ -672,8 +672,13 @@ exit:
eiu->pkgURL[i] = _free(eiu->pkgURL[i]);
}
}
+ if (eiu->sourceURL != NULL) {
+ for (i = 0; i < eiu->numSRPMS; i++)
+ eiu->sourceURL[i] = _free(eiu->sourceURL[i]);
+ }
eiu->pkgState = _free(eiu->pkgState);
eiu->pkgURL = _free(eiu->pkgURL);
+ eiu->sourceURL = _free(eiu->sourceURL);
eiu->argv = _free(eiu->argv);
rc = eiu->numFailed;
free(eiu);
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gys66/rpm.git
git@gitee.com:gys66/rpm.git
gys66
rpm
rpm
master

搜索帮助