hw/i386/multiboot: Avoid dynamic stack allocation
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 19 Aug 2022 15:39:28 +0000 (16:39 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 22 Sep 2022 15:38:28 +0000 (16:38 +0100)
commitfa87341dabebe79d2e5577432a98b83c9eddf968
tree117c374d99a0c8c670dc70df3d0c61f75df2264c
parent7650c8fe520c67c3b36f6962c4ad990f56ad40b8
hw/i386/multiboot: Avoid dynamic stack allocation

Use autofree heap allocation instead of variable-length array on
the stack. Replace the snprintf() call by g_strdup_printf().

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20220819153931.3147384-9-peter.maydell@linaro.org
hw/i386/multiboot.c