From 5ffa6a0af4b45b0b7d97b854c3d03e5e82bfa6ee Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 26 Dec 2022 16:41:17 +0900 Subject: [PATCH] dissect: do not trigger assertion on error recurse_dir() does not provide 'sx' on error. Fixes #25862. --- src/dissect/dissect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c index a9212f11fbb..1d1b8ebc2d0 100644 --- a/src/dissect/dissect.c +++ b/src/dissect/dissect.c @@ -901,11 +901,12 @@ static int mtree_print_item( int r; assert(path); - assert(sx); if (IN_SET(event, RECURSE_DIR_ENTER, RECURSE_DIR_ENTRY)) { _cleanup_free_ char *escaped = NULL; + assert(sx); + if (isempty(path)) path = "."; else { -- 2.47.3