Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DroneCAN: update DSDL compiler #27606

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

tpwrules
Copy link
Contributor

@tpwrules tpwrules commented Jul 22, 2024

Fixes the following issues:

  • Compound array elements subject to tail array optimization could be decoded incorrectly, causing a decode failure.

  • Invalid array lengths could be sent over the wire if a longer-than-max array was encoded (though only the max number of elements was sent).

  • Lengths were not validated when decoding arrays of compound elements using TAO, causing memory corruption if an invalid length was received.

  • Union tags were not validated, causing undefined behavior if an invalid tag was received.

Tested in SITL using quadplane-can. Also tested on the bench using Cube Orange, including testing that a flight controller with this update can talk to a periph without it.

Fixes the following issues:

 * Compound array elements subject to tail array optimization could be
decoded incorrectly, causing a decode failure.

 * Invalid array lengths could be sent over the wire if a
longer-than-max array was encoded (though only the max number of
elements was sent).

 * Lengths were not validated when decoding arrays of compound elements
using TAO, causing memory corruption if an invalid length was received.

 * Union tags were not validated, causing undefined behavior if an
invalid tag was received.
@tridge tridge merged commit b6adb4c into ArduPilot:master Jul 23, 2024
93 checks passed
@tpwrules tpwrules deleted the pr/dronecan-module-update branch July 23, 2024 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants