Commit Graph

10 Commits

Author SHA1 Message Date
Richard Hughes
2203b3ce7b trivial: gi-docgenize some of the function comments 2022-06-14 14:36:52 -05:00
Richard Hughes
ed1b13da28 Split out the memory helpers to a new source file 2022-06-14 14:36:52 -05:00
Richard Hughes
4b1313b406 Split out the GByte helpers to a new source file 2022-06-14 14:36:52 -05:00
Richard Hughes
c6581fb7a6 Split out the GByteArray helpers to a new source file 2022-06-14 14:36:52 -05:00
Richard Hughes
3fe9c0de34 Split out the CRC and sum functions to new source files 2022-06-14 14:36:52 -05:00
Richard Hughes
f885ab6d2a Allow patching firmware files at known offsets
This allows us to replace the 'dfu-tool replace' with a much more
controlled 'fwupdtool firmware-patch' command that patches at a set of
specific offsets.

Drop in the new functionality into the existing firmware ->write()
vfuncs so that the image headers, footers and/or checksums are correct.
2022-01-05 09:51:45 +00:00
Richard Hughes
3ffc3fa774 Add fu_common_sum8() common functionality
We now have 9 different plugins all using this functionality, and we're
about to add one more. Move this into common code so that all the
plugins are using the same endian and bufsz-safe versions.
2021-11-26 18:33:11 +03:00
Richard Hughes
9c7939dae3 trivial: Fix a fuzzing crash for a corrupt IFD image
Sanity check the alignment so we do not write gigabytes of 0xFF's.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39982
2021-10-15 20:05:55 +01:00
Mario Limonciello
55de39c077 trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
Richard Hughes
488f2e1f37 Export the EFI and IFD parsers
We'll need to use this from another plugin soon.
2021-07-12 10:33:38 +01:00