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 #66, correct buffer overflows in UT #67

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

jphickey
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
The default size of the "EventText" string is 32, but the unit test had hard coded string sizes of 50 chars, which will overflow the buffer.

Use "sizeof" operator to adjust to the actual size of the destination to correct the issue.

Fixes #66

Testing performed
Steps taken to test the contribution:

  1. Build steps '...'
  2. Execution steps '...'

Expected behavior changes
No more buffer overflow

System(s) tested on
Debian Bookworm

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

The default size of the "EventText" string is 32, but the unit test had
hard coded string sizes of 50 chars, which will overflow the buffer.

Use "sizeof" operator to adjust to the actual size of the destination to
correct the issue.
@dzbaker dzbaker merged commit f49a965 into nasa:main Jan 19, 2023
@dzbaker dzbaker added this to the Draco milestone Feb 9, 2023
@jphickey jphickey deleted the fix-66-ut-strncpy branch February 17, 2023 16:03
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.

Buffer overflow in unit tests when using default config
2 participants