search for: b3e69e306

Displaying 2 results from an estimated 2 matches for "b3e69e306".

2018 May 04
1
[PATCH] common/qemuopts: ensure arg lists are never empty
...an error if the current arg list has no elements - when creating the argv array, assert that each arg list is not empty --- common/qemuopts/qemuopts.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/common/qemuopts/qemuopts.c b/common/qemuopts/qemuopts.c index b3e69e306..49550bb21 100644 --- a/common/qemuopts/qemuopts.c +++ b/common/qemuopts/qemuopts.c @@ -453,7 +453,15 @@ qemuopts_append_arg_list_format (struct qemuopts *qopts, int qemuopts_end_arg_list (struct qemuopts *qopts) { - /* Nothing to do, the list is already well-formed. */ + struct qopt *qopt; +...
2018 Apr 30
0
[PATCH 3/4] common/qemuopts: use the old pointer as realloc pointer
...the code is the same, already properly checking for the results of realloc(), so this mostly help static code analyzers. --- common/qemuopts/qemuopts.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/qemuopts/qemuopts.c b/common/qemuopts/qemuopts.c index c40d44783..b3e69e306 100644 --- a/common/qemuopts/qemuopts.c +++ b/common/qemuopts/qemuopts.c @@ -168,8 +168,7 @@ extend_options (struct qemuopts *qopts) qopts->nr_alloc = 1; else qopts->nr_alloc *= 2; - new_options = qopts->options; - new_options = realloc (new_options, + new_optio...