nasa / LC

The Core Flight System (cFS) Limit Checker (LC) application.
Apache License 2.0
30 stars 21 forks source link

Fix #66, correct buffer overflows in UT #67

Closed jphickey closed 1 year ago

jphickey commented 1 year ago

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.