qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
To: qemu-devel@nongnu.org
Cc: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>,
	Michael Roth <mdroth@linux.vnet.ibm.com>,
	mitake.hitoshi@gmail.com, Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] [PATCH v2 3/4] qga: initialize progname with error_set_progname()
Date: Thu, 22 Jan 2015 18:08:13 +0900	[thread overview]
Message-ID: <1421917694-6824-4-git-send-email-mitake.hitoshi@lab.ntt.co.jp> (raw)
In-Reply-To: <1421917694-6824-1-git-send-email-mitake.hitoshi@lab.ntt.co.jp>

Calling error_get_progname() in the context of qga can cause
segmentation fault because qga doesn't initialize its progname
with error_set_progname(). This patch adds the initialization.

Currently, the missing call of error_set_progname() doesn't cause any
problems because qga doesn't use error_get_progname(). This patch
is a proactive action.

Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
---
 qga/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qga/main.c b/qga/main.c
index 9939a2b..0885fc6 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -958,6 +958,7 @@ int main(int argc, char **argv)
     GList *blacklist = NULL;
     GAState *s;
 
+    error_set_progname(argv[0]);
     module_call_init(MODULE_INIT_QAPI);
 
     init_dfl_pathnames();
-- 
1.9.1

  parent reply	other threads:[~2015-01-22  9:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22  9:08 [Qemu-devel] [PATCH v2 0/4] initialize progname with error_set_progname() Hitoshi Mitake
2015-01-22  9:08 ` [Qemu-devel] [PATCH v2 1/4] qemu-io: " Hitoshi Mitake
2015-02-02  9:51   ` Hitoshi Mitake
2015-02-02 11:36     ` Kevin Wolf
2015-02-02 14:04       ` Hitoshi Mitake
2015-01-22  9:08 ` [Qemu-devel] [PATCH v2 2/4] qemu-nbd: " Hitoshi Mitake
2015-01-22  9:08 ` Hitoshi Mitake [this message]
2015-01-22  9:08 ` [Qemu-devel] [PATCH v2 4/4] linux-user: " Hitoshi Mitake
2015-01-22 10:07   ` Peter Maydell
2015-02-02  9:47     ` Hitoshi Mitake
2015-01-22  9:47 ` [Qemu-devel] [PATCH v2 0/4] " Markus Armbruster

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=1421917694-6824-4-git-send-email-mitake.hitoshi@lab.ntt.co.jp \
    --to=mitake.hitoshi@lab.ntt.co.jp \
    --cc=armbru@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=mitake.hitoshi@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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).