mirror of
https://git.proxmox.com/git/fwupd
synced 2025-10-18 19:25:08 +00:00
Do not assume the metainfo file is NUL-terminated
This was only true by accident. We'll need another fix for the LVFS to add the missing NUL to restore compatibility for older clients. Fixes https://github.com/fwupd/fwupd/issues/3533
This commit is contained in:
parent
5a6dccfa69
commit
ae48e02ac2
@ -485,10 +485,10 @@ fu_cabinet_build_silo_file (FuCabinet *self,
|
||||
"no GBytes from GCabFile");
|
||||
return FALSE;
|
||||
}
|
||||
if (!xb_builder_source_load_xml (source,
|
||||
g_bytes_get_data (blob, NULL),
|
||||
XB_BUILDER_SOURCE_FLAG_NONE,
|
||||
&error_local)) {
|
||||
if (!xb_builder_source_load_bytes (source,
|
||||
blob,
|
||||
XB_BUILDER_SOURCE_FLAG_NONE,
|
||||
&error_local)) {
|
||||
g_set_error (error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_INVALID_FILE,
|
||||
|
Loading…
Reference in New Issue
Block a user