mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-08 18:14:44 +00:00
acpi-phat: Fix a critical warning when parsing an invalid PHAT record
See https://oss-fuzz.com/testcase-detail/6099569951244288 for details.
This commit is contained in:
parent
060e40b16c
commit
2fbadaa95f
@ -103,7 +103,7 @@ fu_acpi_phat_health_record_parse(FuFirmware *firmware,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* check this is an even number of bytes */
|
/* check this is an even number of bytes */
|
||||||
if (ubufsz % 2 != 0) {
|
if (ubufsz == 0 || ubufsz % 2 != 0) {
|
||||||
g_set_error(error,
|
g_set_error(error,
|
||||||
G_IO_ERROR,
|
G_IO_ERROR,
|
||||||
G_IO_ERROR_INVALID_DATA,
|
G_IO_ERROR_INVALID_DATA,
|
||||||
|
Loading…
Reference in New Issue
Block a user