Patchwork [1/2] qemu-option: avoid segfault if QemuOptsList == NULL

login
register
mail settings
Submitter Peter Lieven
Date March 19, 2013, 8:19 a.m.
Message ID <1363681158-26122-2-git-send-email-pl@kamp.de>
Download mbox | patch
Permalink /patch/228944/
State New
Headers show

Comments

Peter Lieven - March 19, 2013, 8:19 a.m.
Signed-off-by: Peter Lieven <pl@kamp.de>
---
 util/qemu-option.c |    1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/util/qemu-option.c b/util/qemu-option.c
index 8b74bf1..24479d2 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -938,6 +938,7 @@  static QemuOpts *opts_parse(QemuOptsList *list, const char *params,
     QemuOpts *opts;
     Error *local_err = NULL;
 
+    assert(list != NULL);
     assert(!permit_abbrev || list->implied_opt_name);
     firstname = permit_abbrev ? list->implied_opt_name : NULL;