Commit Graph

2 Commits

Author SHA1 Message Date
Richard Hughes
0c51630991 Check firmware magic in a more standard way
Some parsers are ignoring the magic when using _FLAG_IGNORE_CHECKSUM
(which is wrong; fuzzers have no problem with enforcing a static prefix)
and other either disregard the offset or check the magic in an unsafe
way. Also, use FWUPD_ERROR_INVALID_FILE consistently for magic failure.

Add a vfunc, and move all the clever code into one place.
2022-07-14 14:48:15 +01:00
Richard Hughes
0a7eb03704 Add a linear firmware wrapper
This allows us to parse any concatenated firmware format where the
image size is stored in the image.
2022-06-28 10:09:58 +01:00