提交 4690579e 编写于 作者: A Amos Kong 提交者: Anthony Liguori

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: NGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: NAmos Kong <akong@redhat.com>
Message-id: 1363774594-21001-1-git-send-email-akong@redhat.com
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 a130c6b2
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册