From f2e721457ddd8a3b974c3c19a0c0c3cfa0e8a9ec Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 26 May 2025 17:58:48 +0200 Subject: [PATCH] libmount: (verity) fix compiler warning libmount/src/hook_veritydev.c: In function 'setup_veritydev': libmount/src/hook_veritydev.c:457:13: warning: '%s' directive argument is null [-Wformat-overflow=] Signed-off-by: Karel Zak --- libmount/src/hook_veritydev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmount/src/hook_veritydev.c b/libmount/src/hook_veritydev.c index 12c630897..0b5856844 100644 --- a/libmount/src/hook_veritydev.c +++ b/libmount/src/hook_veritydev.c @@ -461,7 +461,7 @@ static int setup_veritydev( struct libmnt_context *cxt, * a lot of time and resources when there are duplicated mounts. If the roothash is the same, then the volumes * are also guaranteed to be identical. This is what systemd also does, so we can deduplicate across the whole * system. */ - if (asprintf(&mapper_device, "%s-verity", root_hash) < 0) + if (!rc && asprintf(&mapper_device, "%s-verity", root_hash) < 0) rc = -ENOMEM; if (!rc) -- 2.47.2