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

AP_Mount: Topotek safely parses version packet #27616

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Jul 23, 2024

This corrects a potential issue in the Topotek driver (introduced this morning by PR #27568) that could lead to writing past the end of the "version" variable while parsing the version packet received from the gimbal.

This has been lightly tested on real hardware but the exact code path affected is not run due to the hardware I'm using sending the old style version string
image

Thanks @peterbarker for finding this issue

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think your patch will parse enough of the inbound string.

My suggestion is a bit simpler, I think?

libraries/AP_Mount/AP_Mount_Topotek.cpp Outdated Show resolved Hide resolved
@tridge tridge merged commit 2b64787 into ArduPilot:master Jul 24, 2024
93 checks passed
@rmackay9 rmackay9 deleted the topotek-version-fix branch July 24, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants