Commit Graph

13 Commits

Author SHA1 Message Date
Richard Hughes
776a0890fe srec: Make FuIhexFirmware derivable for possible future use
An ABI change, so probably not a good idea to backport.
2021-04-06 14:54:39 +01:00
Richard Hughes
1c0ed3ab1d srec: Detect overflow to avoid adding ~4GB of 0xFF padding
Fixes https://oss-fuzz.com/testcase-detail/5468114109202432
2021-03-14 09:50:39 +00:00
Richard Hughes
d27bfc08fd srec: Fix a fuzzing failure when trying to build zero sized firmware 2021-03-11 15:48:02 +00:00
Richard Hughes
88969d10c4 srec: Actually include the address in the written data 2021-03-11 15:48:02 +00:00
Richard Hughes
7c0560c37f srec: Add support for writing firmware 2021-03-10 21:39:01 -06:00
Richard Hughes
1981c63d58 Remove FuFirmwareImage and just use FuFirmware instead
This allows us to 'nest' firmware formats, and removes a ton of duplication.

The aim here is to deprecate FuFirmwareImage -- it's almost always acting
as a 'child' FuFirmware instance, and even copies most of the vfuncs to allow
custom types. If I'm struggling to work out what should be a FuFirmware and
what should be a FuFirmwareImage then a plugin author has no hope.

For simple payloads we were adding bytes into an image and then the image into
a firmware. This gets really messy when most plugins are treating the FuFirmware
*as* the binary firmware file.

The GBytes saved in the FuFirmware would be considered the payload with the
aim of not using FuFirmwareImage in the single-image case.
2021-03-09 21:14:12 +00:00
Richard Hughes
60a4b56802 srec: Fix an overflow causing an infinite loop when parsing 2021-02-12 20:51:39 +00:00
Richard Hughes
54bc512388 Add firmware flags for presence of CRC and VID/PID 2021-02-11 20:27:20 +00:00
Richard Hughes
2e73bef923 Be more paranoid when parsing from ASCII buffers 2021-02-09 16:37:25 +00:00
Richard Hughes
647ec9677e trivial: Do not show unprintable text when parsing invalid SREC firmware 2021-01-06 10:08:45 +00:00
Richard Hughes
6450d0deb4 Add FwupdInstallFlags of _IGNORE_CHECKSUM, _IGNORE_VID_PID and _IGNORE_POWER
The FWUPD_INSTALL_FLAG_FORCE flag has really unclear semantics, and ignoring a
file CRC, checksum or model ID should only be done when using fwupdtool actually
debugging a plugin or firmware parser.

Use the existing --force flag when we want a "gentle nudge" like reuploading
previously processed reports.
2020-10-07 13:15:09 +01:00
Richard Hughes
00f66f659d trivial: Do not include non-introspectable functions in the GIR
If we do need these for managed languages, we can of course create boxed types
when requried.
2019-11-27 12:45:35 +00:00
Mario Limonciello
6b0e66354b Convert libfwupdprivate to a shared library libfwupdplugin 2019-11-27 11:32:43 +00:00