Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage-utils:master commit in: libq/
Date: Sat, 04 May 2019 11:53:52
Message-Id: 1556970691.55a3b37772e4e4f70b3eaf76916f2b1450d26a6e.grobian@gentoo
1 commit: 55a3b37772e4e4f70b3eaf76916f2b1450d26a6e
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 4 11:51:31 2019 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sat May 4 11:51:31 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=55a3b377
7
8 libq/cache: probably fix crash from bug #684252#c22
9
10 Ensure we renew the local ebuild dir context after we found a problem
11 with the previous directory
12
13 Bug: https://bugs.gentoo.org/684252
14 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
15
16 libq/cache.c | 4 +++-
17 1 file changed, 3 insertions(+), 1 deletion(-)
18
19 diff --git a/libq/cache.c b/libq/cache.c
20 index 0dbf483..a8b4ede 100644
21 --- a/libq/cache.c
22 +++ b/libq/cache.c
23 @@ -163,8 +163,10 @@ cache_next_pkg(cache_cat_ctx *cat_ctx)
24
25 /* opening might fail if what we found wasn't a
26 * directory or something */
27 - if (ctx->ebuilddir_cat_ctx == NULL)
28 + if (ctx->ebuilddir_cat_ctx == NULL) {
29 + ctx->ebuilddir_pkg_ctx = NULL;
30 return NULL;
31 + }
32 }
33
34 ret = q_vdb_next_pkg(ctx->ebuilddir_cat_ctx);