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

Remove usages of variable length arrays #758

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

Joshua-Anderson
Copy link
Contributor

Originating Project/Creator
Affected Component
Affected Architectures(s)
Related Issue(s)
Has Unit Tests (y/n)
Builds Without Errors (y/n)
Unit Tests Pass (y/n) y
Documentation Included (y/n)

Change Description

Remove usages of variable length arrays

Rationale

Variable length arrays are not part of the C++ standard and present a risk of
stack overflows in the case of an codeing error. Replace variable length arrays
with a statically sized array large enough to handle the maximum possible input.

Variable length arrays are not part of the C++ standard and present a risk of
stack overflows in the case of an codeing error. Replace variable length arrays
with a statically sized array large enough to handle the maximum possible input.
Copy link
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

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

We should convert the "size write" of buffer logger to use our standard serialization techniques (e.g. use an Fw::ExternalBuffer" and serialize the size....but this is good for now.

@LeStarch LeStarch merged commit e37dedb into nasa:devel Jun 30, 2021
@Joshua-Anderson Joshua-Anderson deleted the remove-vlas branch June 30, 2021 15:54
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.

2 participants