mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-16 04:05:40 +00:00
ihex: Do not allow data sections after EOF
This commit is contained in:
parent
d4ad7cef71
commit
69016bda04
@ -228,6 +228,16 @@ fu_ihex_firmware_parse (FuFirmware *firmware,
|
||||
/* process different record types */
|
||||
switch (rcd->record_type) {
|
||||
case FU_IHEX_FIRMWARE_RECORD_TYPE_DATA:
|
||||
|
||||
/* does not make sense */
|
||||
if (got_eof) {
|
||||
g_set_error_literal (error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_INVALID_FILE,
|
||||
"cannot process data after EOF");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* base address for element */
|
||||
if (img_addr == G_MAXUINT32)
|
||||
img_addr = addr;
|
||||
|
Loading…
Reference in New Issue
Block a user