commit: 36a1c566e177e8af5d05b5406b8834d299652173
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat May 16 14:18:39 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat May 16 14:18:39 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=36a1c566
quse: Coverity rightly pointed out state->match may be NULL
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
quse.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/quse.c b/quse.c
index 1e39ce0..5105638 100644
--- a/quse.c
+++ b/quse.c
@@ -141,7 +141,8 @@ quse_search_use_local_desc(int portdirfd, struct quse_state
*state)
continue;
atom->REPO = (char *)state->repo;
- atom->SLOT = state->match->SLOT; /* fake match */
+ if (state->match != NULL)
+ atom->SLOT = state->match->SLOT; /* fake match
*/
if (state->match == NULL ||
atom_compare(atom, state->match) ==
EQUAL)
{