nasa / cFE

The Core Flight System (cFS) Core Flight Executive (cFE)
Apache License 2.0
402 stars 198 forks source link

Fix #2529, Reduces CFE_EVS_MAX_PORT_MSG_LENGTH to prevent new line character truncation #2566

Closed chillfig closed 1 week ago

chillfig commented 1 month ago

Checklist (Please check before submitting)

Describe the contribution A clear and concise description of what the contribution is.

Testing performed Started cFS and reviewed startup messages.

Expected behavior changes Enough space should now be allocated to PortMessage such that it is null terminated and ends with a new line character when printed out via ports.

System(s) tested on

Additional context Alternative solutions considered

cFS_startup_cpu1_PrePR.txt

This is what the startup messages look like after including this PR. cFS_startup_cpu1_19buf.txt

This is what the startup messages look like after including code to check for snprintf() return value. This Note that CI_LAB_APP, CI_LAB_APP, and TO_LAB_APP all now have Truncation warnings and the message isn't concatenated to the next discrete message but ends with a *\0 cFS_startup_cpu1_PostPR.txt

Third party code N/A

Contributor Info - All information REQUIRED for consideration of pull request Justin Figueroa, Vantage Systems

chillfig commented 1 month ago

CCB 5/30/2024: This is a configuration issue. Amend so that configuration parameters that work together and not add arbitrary limitations. Consider giving user control as to what CFE_EVS_MAX_PORT_MSG_LENGTH is. Consider that cfe_evs_task.h compile-time check for CFE_EVS_MAX_PORT_MSG_LENGTH looks at extra characters needed.

chillfig commented 1 week ago

Action: Write new low priority ticket for representing the 11 bytes reduced in CFE_EVS_MAX_PORT_MSG_LENGTH with this pull request

chillfig commented 1 week ago

Action: Write new low priority ticket for representing the 11 bytes reduced in CFE_EVS_MAX_PORT_MSG_LENGTH with this pull request

Done. https://github.com/nasa/cFE/issues/2571