commit: 55a3b37772e4e4f70b3eaf76916f2b1450d26a6e Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Sat May 4 11:51:31 2019 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Sat May 4 11:51:31 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=55a3b377
libq/cache: probably fix crash from bug #684252#c22 Ensure we renew the local ebuild dir context after we found a problem with the previous directory Bug: https://bugs.gentoo.org/684252 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> libq/cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libq/cache.c b/libq/cache.c index 0dbf483..a8b4ede 100644 --- a/libq/cache.c +++ b/libq/cache.c @@ -163,8 +163,10 @@ cache_next_pkg(cache_cat_ctx *cat_ctx) /* opening might fail if what we found wasn't a * directory or something */ - if (ctx->ebuilddir_cat_ctx == NULL) + if (ctx->ebuilddir_cat_ctx == NULL) { + ctx->ebuilddir_pkg_ctx = NULL; return NULL; + } } ret = q_vdb_next_pkg(ctx->ebuilddir_cat_ctx);
