mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-06 23:14:37 +00:00
ihex: Do not allow zero-sized data sections
This commit is contained in:
parent
69016bda04
commit
c8423fd685
@ -237,6 +237,13 @@ fu_ihex_firmware_parse (FuFirmware *firmware,
|
|||||||
"cannot process data after EOF");
|
"cannot process data after EOF");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (rcd->data->len == 0) {
|
||||||
|
g_set_error_literal (error,
|
||||||
|
FWUPD_ERROR,
|
||||||
|
FWUPD_ERROR_INVALID_FILE,
|
||||||
|
"cannot parse invalid data");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* base address for element */
|
/* base address for element */
|
||||||
if (img_addr == G_MAXUINT32)
|
if (img_addr == G_MAXUINT32)
|
||||||
|
Loading…
Reference in New Issue
Block a user