summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmos Kong2013-03-20 11:16:34 +0100
committerAnthony Liguori2013-04-02 15:13:22 +0200
commit4690579e9bafa0a2a49d7b12dae905279a552cd6 (patch)
treeeea693b2aa0da29d90c8686fab9ffb6e0033169b
parentMerge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20130401.0' int... (diff)
downloadqemu-4690579e9bafa0a2a49d7b12dae905279a552cd6.tar.gz
qemu-4690579e9bafa0a2a49d7b12dae905279a552cd6.tar.xz
qemu-4690579e9bafa0a2a49d7b12dae905279a552cd6.zip
append the terminating '\0' to bootorder string
Problem was introduced in commit c8a6ae8b. The last terminating '\0' was lost, use the right length 5 ("HALT\0"). Reported-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Amos Kong <akong@redhat.com> Message-id: 1363774594-21001-1-git-send-email-akong@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--vl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index 52eacca35f..e2c97062fd 100644
--- a/vl.c
+++ b/vl.c
@@ -1278,9 +1278,9 @@ char *get_boot_devices_list(size_t *size)
if (boot_strict && *size > 0) {
list[total-1] = '\n';
- list = g_realloc(list, total + 4);
- memcpy(&list[total], "HALT", 4);
- *size = total + 4;
+ list = g_realloc(list, total + 5);
+ memcpy(&list[total], "HALT", 5);
+ *size = total + 5;
}
return list;
}