util/uuid: Add UUID_STR_LEN definition
commit721da0396cfa0a4859cefb57e32cc79d19d80f54
authorCédric Le Goater <clg@redhat.com>
Thu, 26 Oct 2023 07:06:34 +0000 (26 09:06 +0200)
committerCédric Le Goater <clg@redhat.com>
Fri, 3 Nov 2023 08:20:31 +0000 (3 09:20 +0100)
tree567f65bca8df6e5006bf9d3376d0411717fc5739
parentba7d12eb8ce2d7367615071c0569947457d36803
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>
block/parallels-ext.c
block/vdi.c
hw/core/qdev-properties-system.c
hw/hyperv/vmbus.c
include/qemu/uuid.h
migration/savevm.c
tests/unit/test-uuid.c
util/uuid.c