append the terminating '\0' to bootorder string
PATCH 1/1 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 <[email protected]>
Signed-off-by Amos Kong <[email protected]>
--- vl.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
vl.c +3 -3
@@ -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; }
Signature · 1 line
1.7.1
Quoted 2 lines · Amos Kong
Problem was introduced in commit
c8a6ae8b. The last terminating '\0' was lost, use the right length 5 ("HALT\0").
Acked-by Gerd Hoffmann <[email protected]>
cheers,
Gerd
Anthony Liguori
AppliedApplied. Thanks.
Regards,
Anthony Liguori