From: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
To: qemu-devel@nongnu.org
Cc: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>,
Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
mitake.hitoshi@gmail.com
Subject: [Qemu-devel] [PATCH] qemu-io: initialize progname with error_set_progname()
Date: Mon, 11 Aug 2014 15:50:03 +0900 [thread overview]
Message-ID: <1407739803-22699-1-git-send-email-mitake.hitoshi@lab.ntt.co.jp> (raw)
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
next reply other threads:[~2014-08-11 6:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 6:50 Hitoshi Mitake [this message]
2014-08-11 11:20 ` [Qemu-devel] [PATCH] qemu-io: initialize progname with error_set_progname() Markus Armbruster
2014-08-12 5:17 ` Hitoshi Mitake
2014-08-11 14:38 ` Stefan Hajnoczi
2014-08-12 5:21 ` Hitoshi Mitake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1407739803-22699-1-git-send-email-mitake.hitoshi@lab.ntt.co.jp \
--to=mitake.hitoshi@lab.ntt.co.jp \
--cc=kwolf@redhat.com \
--cc=mitake.hitoshi@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).