* [Qemu-devel] [PATCH] append the terminating '\0' to bootorder string
@ 2013-03-20 10:16 Amos Kong
2013-04-02 8:50 ` Gerd Hoffmann
2013-04-02 20:21 ` Anthony Liguori
0 siblings, 2 replies; 3+ messages in thread
From: Amos Kong @ 2013-03-20 10:16 UTC (permalink / raw)
To: aliguori, qemu-devel; +Cc: kraxel
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>
---
vl.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/vl.c b/vl.c
index aeed7f4..d3172ea 100644
--- a/vl.c
+++ b/vl.c
@@ -1273,9 +1273,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;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] append the terminating '\0' to bootorder string
2013-03-20 10:16 [Qemu-devel] [PATCH] append the terminating '\0' to bootorder string Amos Kong
@ 2013-04-02 8:50 ` Gerd Hoffmann
2013-04-02 20:21 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2013-04-02 8:50 UTC (permalink / raw)
To: Amos Kong; +Cc: aliguori, qemu-devel
On 03/20/13 11:16, Amos Kong wrote:
> Problem was introduced in commit c8a6ae8b. The last terminating
> '\0' was lost, use the right length 5 ("HALT\0").
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
cheers,
Gerd
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] append the terminating '\0' to bootorder string
2013-03-20 10:16 [Qemu-devel] [PATCH] append the terminating '\0' to bootorder string Amos Kong
2013-04-02 8:50 ` Gerd Hoffmann
@ 2013-04-02 20:21 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2013-04-02 20:21 UTC (permalink / raw)
To: Amos Kong, aliguori, qemu-devel; +Cc: kraxel
Applied. Thanks.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-02 20:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-20 10:16 [Qemu-devel] [PATCH] append the terminating '\0' to bootorder string Amos Kong
2013-04-02 8:50 ` Gerd Hoffmann
2013-04-02 20:21 ` Anthony Liguori
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.