mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
util/uuid: Add UUID_STR_LEN definition
qemu_uuid_unparse() includes a trailing NUL when writing the uuid string and the buffer size should be UUID_FMT_LEN + 1 bytes. Add a define for this size and use it where required. Cc: Fam Zheng <fam@euphon.net> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: "Denis V. Lunev" <den@openvz.org> Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
ba7d12eb8c
commit
721da0396c
8 changed files with 10 additions and 9 deletions
|
@ -471,8 +471,8 @@ static bool vmstate_uuid_needed(void *opaque)
|
|||
static int vmstate_uuid_post_load(void *opaque, int version_id)
|
||||
{
|
||||
SaveState *state = opaque;
|
||||
char uuid_src[UUID_FMT_LEN + 1];
|
||||
char uuid_dst[UUID_FMT_LEN + 1];
|
||||
char uuid_src[UUID_STR_LEN];
|
||||
char uuid_dst[UUID_STR_LEN];
|
||||
|
||||
if (!qemu_uuid_set) {
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue