[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] qemu-io: initialize progname with error_set_prognam
From: |
Hitoshi Mitake |
Subject: |
[Qemu-devel] [PATCH] qemu-io: initialize progname with error_set_progname() |
Date: |
Mon, 11 Aug 2014 15:50:03 +0900 |
Calling error_get_progname() in the context of qemu-io can cause
segmentation fault because qemu-io doesn't initialize its progname
with error_set_progname(). This patch adds the initialization.
Cc: Kevin Wolf <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Signed-off-by: Hitoshi Mitake <address@hidden>
---
qemu-io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/qemu-io.c b/qemu-io.c
index b55a550..6f08a91 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -395,6 +395,7 @@ int main(int argc, char **argv)
#endif
progname = basename(argv[0]);
+ error_set_progname(progname);
qemu_init_exec_dir(argv[0]);
while ((c = getopt_long(argc, argv, sopt, lopt, &opt_index)) != -1) {
--
1.8.3.2
- [Qemu-devel] [PATCH] qemu-io: initialize progname with error_set_progname(),
Hitoshi Mitake <=