From 07b368d6b1480aba309826ea154ec623351362a6 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 9 Sep 2022 10:02:30 +0100 Subject: [PATCH] vbe: Fix a crash when dumping firmware PVS: The null pointer is passed into 'g_byte_array_append' function. --- plugins/vbe/fu-vbe-simple-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/vbe/fu-vbe-simple-device.c b/plugins/vbe/fu-vbe-simple-device.c index c24dbf08c..85e7f9ac9 100644 --- a/plugins/vbe/fu-vbe-simple-device.c +++ b/plugins/vbe/fu-vbe-simple-device.c @@ -388,7 +388,7 @@ fu_vbe_simple_device_upload(FuDevice *device, FuProgress *progress, GError **err { FuVbeSimpleDevice *self = FU_VBE_SIMPLE_DEVICE(device); gssize rc; - g_autoptr(GByteArray) buf = NULL; + g_autoptr(GByteArray) buf = g_byte_array_new(); g_autoptr(GPtrArray) chunks = NULL; /* notify UI */