libguestfs/0003-lib-create.c-Fix-string-passed-to-printf-like-functi.patch
Richard W.M. Jones f1a7701278 Capture and raise qemu-img stderr
resolves: RHEL-92239
Ignore btrfs snapshots of roots
resolves: RHEL-93109
2025-05-27 17:10:57 +01:00

32 lines
961 B
Diff

From 833e5e63b3d03c9500727e167f5d7287dfeafbd2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 22 May 2025 09:48:14 +0100
Subject: [PATCH] lib/create.c: Fix string passed to printf-like function
create.c: In function 'disk_create_qcow2':
create.c:372:5: error: format not a string literal and no format arguments [-Werror=format-security]
372 | debug (g, cmd_stdout);
| ^~~~~
Fixes: commit 606aa1d1822260905a5dd8a47f29a66652168f22
---
lib/create.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/create.c b/lib/create.c
index 72b4632c8..67631132f 100644
--- a/lib/create.c
+++ b/lib/create.c
@@ -369,7 +369,7 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size,
guestfs_int_external_command_failed (g, r, "qemu-img", cmd_stdout);
return -1;
} else {
- debug (g, cmd_stdout);
+ debug (g, "%s", cmd_stdout);
}
return 0;
--
2.47.1