summaryrefslogtreecommitdiffstats
path: root/rpminfo.c
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-03-13 08:17:10 +0100
committerRemi Collet <remi@remirepo.net>2020-03-13 08:17:10 +0100
commitcb84354da288ca88d3ad4f5757e44e8e7e004f41 (patch)
treed061de20657eef6227637621cacada1677c9b1b6 /rpminfo.c
parentdd33daa4017a787583f710eb8a15e8ade18d19cd (diff)
sanity: ensure mode is not < 0
Diffstat (limited to 'rpminfo.c')
-rw-r--r--rpminfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpminfo.c b/rpminfo.c
index 0b18644..83e270d 100644
--- a/rpminfo.c
+++ b/rpminfo.c
@@ -399,7 +399,7 @@ PHP_FUNCTION(rpmdbsearch)
di = rpmdbInitIterator(db, RPMDBI_PACKAGES, NULL, 0);
/* add criterion */
if (di) {
- if (rpmdbSetIteratorRE(di, crit, mode, name)) {
+ if (rpmdbSetIteratorRE(di, crit, (mode<0 ? RPMMIRE_DEFAULT : mode), name)) {
php_error_docref(NULL, E_WARNING, "Can't set filter");
rpmtsCloseDB(ts);
RETURN_FALSE;