Files
PX4-Autopilot/platforms/nuttx
Julian Oes 735fa7bf84 fix(canbootloader): bound the BeginFirmwareUpdate length and the progress math (#29485)
wait_for_beginfirmwareupdate() subtracted the source_node_id field from
the received length without checking the request was that long, so an
empty request wrapped the firmware path length to SIZE_MAX and the
following GetInfo and Read requests were built from far past the path
buffer. Keep waiting until a request long enough to hold the field
arrives.

The programming progress divided by fw_image_size / 100, which is zero
for images under 100 bytes, and an image down to the size of the app
descriptor is accepted. Scale the offset instead.

Reported by @doridoriJJ.

Assisted-by: Claude:claude-opus-5-5

Signed-off-by: Julian Oes <julian@oes.ch>
(cherry picked from commit f7191cdb30)
2026-10-30 15:17:00 +01:00
..
…