diff options
author | Remi Collet <remi@remirepo.net> | 2020-03-13 08:17:10 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-03-13 08:17:10 +0100 |
commit | cb84354da288ca88d3ad4f5757e44e8e7e004f41 (patch) | |
tree | d061de20657eef6227637621cacada1677c9b1b6 /rpminfo.c | |
parent | dd33daa4017a787583f710eb8a15e8ade18d19cd (diff) |
sanity: ensure mode is not < 0
Diffstat (limited to 'rpminfo.c')
-rw-r--r-- | rpminfo.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |