qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-io: initialize progname with error_set_progname()
@ 2014-08-11  6:50 Hitoshi Mitake
  2014-08-11 11:20 ` Markus Armbruster
  2014-08-11 14:38 ` Stefan Hajnoczi
  0 siblings, 2 replies; 5+ messages in thread
From: Hitoshi Mitake @ 2014-08-11  6:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: Hitoshi Mitake, Kevin Wolf, Stefan Hajnoczi, mitake.hitoshi

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 <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-12  5:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-11  6:50 [Qemu-devel] [PATCH] qemu-io: initialize progname with error_set_progname() Hitoshi Mitake
2014-08-11 11:20 ` Markus Armbruster
2014-08-12  5:17   ` Hitoshi Mitake
2014-08-11 14:38 ` Stefan Hajnoczi
2014-08-12  5:21   ` Hitoshi Mitake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).