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

Fix #44, #46, instantiate properly sized and aligned buffers #76

Merged
merged 1 commit into from
Dec 8, 2021

Conversation

jphickey
Copy link
Contributor

@jphickey jphickey commented Dec 1, 2021

For unit unit tests that invoke CF PDU processing functions on either input or output, ensure that the locally instantiated
"dummy" PDU is both sized sufficiently and aligned correctly.

This removes quite a bit of questionable casting between the buffer types, and fixes a number of stack-smashing issues.

For completeness, this also clears (memset to 0) all instantiated buffers, before setting values in the test. This ensures that the
entire message structure has predictable/repeatable content.

Fixes #44
Fixes #46

For unit unit tests that invoke CF PDU processing functions
on either input or output, ensure that the locally instantiated
"dummy" PDU is both sized sufficiently and aligned correctly.

This removes quite a bit of questionable casting between the
buffer types, and fixes a number of stack-smashing issues.

For completeness, this also clears (memset to 0) all instantiated
buffers, before setting values in the test.  This ensures that the
entire message structure has predictable/repeatable content.
@jphickey jphickey added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Dec 1, 2021
@astrogeco astrogeco removed the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Dec 8, 2021
@astrogeco
Copy link
Contributor

CCB:2021-12-08 - APPROVED

@astrogeco astrogeco merged commit ad602ec into nasa:main Dec 8, 2021
@jphickey jphickey deleted the fix-44-46-ut-msg-buffers branch December 9, 2021 16:39
@skliper skliper added this to the Draco milestone Mar 25, 2022
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.

CF - Incorrect cast in test functions CF unit tests use incorrect dummy buffers
3 participants