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

amq_detection_component is reading past the end of a buffer. #1585

Closed
brosenberg42 opened this issue Sep 6, 2022 · 0 comments
Closed

amq_detection_component is reading past the end of a buffer. #1585

brosenberg42 opened this issue Sep 6, 2022 · 0 comments

Comments

@brosenberg42
Copy link
Member

The issue occurs here: https://github.com/openmpf/openmpf/blob/master/trunk/detection/executor/cpp/batch/main.cpp#L648

The string constructor being invoked will read up until the null character, but input_buf doesn't contain a null character. This means that the string constructor will read past the end of input_buf until it comes across a null terminator. The call to std_input.resize removes the garbage at the end of string, but the string constructor may not run in to a null character for a long time.

@brosenberg42 brosenberg42 added this to the Milestone 3 milestone Sep 6, 2022
@brosenberg42 brosenberg42 self-assigned this Sep 6, 2022
@brosenberg42 brosenberg42 added this to To do in OpenMPF: Development via automation Sep 6, 2022
@jrobble jrobble moved this from To do to In Progress in OpenMPF: Development Sep 9, 2022
@jrobble jrobble added the hotfix label Sep 9, 2022
OpenMPF: Development automation moved this from In Progress to Closed Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Closed
Development

No branches or pull requests

2 participants