summaryrefslogtreecommitdiffstats
path: root/rpminfo.c
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-11-10 10:32:24 +0100
committerRemi Collet <remi@php.net>2023-11-10 10:32:24 +0100
commit9f7298ac633f610af96b0b915e49596bb5520aeb (patch)
treea450ea70c4223dd8cd43abadb1b8946d21e65c70 /rpminfo.c
parent09f16e5a8944ec0f741cecac37ff75b9067827ea (diff)
don't rely on rpmfiSetFX return value
Diffstat (limited to 'rpminfo.c')
-rw-r--r--rpminfo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rpminfo.c b/rpminfo.c
index 13d4293..08ba780 100644
--- a/rpminfo.c
+++ b/rpminfo.c
@@ -857,8 +857,9 @@ PHP_FUNCTION(rpmgetsymlink)
fi = rpmfiNewArchiveReader(gzdi, files, RPMFI_ITER_READ_ARCHIVE);
rc = rpmfiFindFN(fi, name);
+ rpmfiSetFX(fi, rc); /* return value not reliable on librpm < 4.17 */
if (rc < 0
- || rpmfiSetFX(fi, rc) < 0
+ || rpmfiFX(fi) != rc
|| (link = rpmfiFLink(fi)) == NULL) {
RETVAL_NULL();
} else {