代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/rpm 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 3a50688558f18cfb250b2e70bc34464a8e089d32 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Tue, 20 Jun 2023 09:34:47 +0300
Subject: [PATCH] Fix rpmDigestBundleFinal() and Update() return code on
invalid arguments
Discovered via #2548, these functions merrily return zero for success
when passed NULL data. In rpm nothing bothers to check for their return
codes but it doesn't mean it's the right thing to do
---
rpmio/digest.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/rpmio/digest.c b/rpmio/digest.c
index 1975fe6b9..9c679d820 100644
--- a/rpmio/digest.c
+++ b/rpmio/digest.c
@@ -77,8 +77,9 @@ int rpmDigestBundleAddID(rpmDigestBundle bundle, int algo, int id,
}
int rpmDigestBundleUpdate(rpmDigestBundle bundle, const void *data, size_t len)
{
- int rc = 0;
+ int rc = -1;
if (bundle && data && len > 0) {
+ rc = 0;
for (int i = 0; i <= bundle->index_max; i++) {
if (bundle->ids[i] > 0)
rc += rpmDigestUpdate(bundle->digests[i], data, len);
@@ -91,7 +92,7 @@ int rpmDigestBundleUpdate(rpmDigestBundle bundle, const void *data, size_t len)
int rpmDigestBundleFinal(rpmDigestBundle bundle, int id,
void ** datap, size_t * lenp, int asAscii)
{
- int rc = 0;
+ int rc = -1;
int ix = findID(bundle, id);
if (ix >= 0) {
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。