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

mavlink_ftp: handle relative paths correctly #22980

Merged
merged 3 commits into from
May 7, 2024
Merged

Conversation

bkueng
Copy link
Member

@bkueng bkueng commented Apr 5, 2024

By ensuring there's a '/' in between when concatenating the path with _root_dir.

It turns out there's a bug in GQC where a component metadata uri like mftp://etc/extras/component_general.json.xz is turned into an ftp request with path /etc/extras/component_general.json.xz, whereas it should be etc/extras/component_general.json.xz.

bkueng added 3 commits April 26, 2024 08:42
by ensuring there's a '/' in between when concatenating the path with
_root_dir.
Prevents accessing invalid memory when reading ptr + oldpath_sz + 1 and
oldpath_sz fills out the whole or N-1 bytes of the payload.
This would interfere with an existing ongoing session
@bkueng bkueng force-pushed the mftp_relative_path branch from c190d9b to 019cf1f Compare April 26, 2024 06:42
@bkueng bkueng merged commit e17faec into main May 7, 2024
93 checks passed
@bkueng bkueng deleted the mftp_relative_path branch May 7, 2024 05:26
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.

1 participant