vbe: Fix a crash when dumping firmware

PVS: The null pointer is passed into 'g_byte_array_append' function.
This commit is contained in:
Richard Hughes 2022-09-09 10:02:30 +01:00
parent c62e7a6bab
commit 07b368d6b1

View File

@ -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 */