You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.
Describe the bug
The output from CFE_SB_ReceiveBuffer() is a pointer to a shared buffer, and thus should be interpreted as const data. The only reason it is not qualified const in the API was due to backward compatibility concerns.
However, CF is actually writing to the buffer in two places.
To Reproduce
Send those commands
Expected behavior
Should not write to a buffer that was received from SB
/* make sure that the src and dst filenames are null terminated */
tx->src_filename[sizeof(tx->src_filename) -1] =0;
tx->dst_filename[sizeof(tx->dst_filename) -1] =0;
System observed on:
Inspection
Additional context
This is done to ensure null termination of the string. While a valid concern, a function like CFE_SB_MessageStringGet() should be used instead.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
Checklist (Please check before submitting)
Describe the bug
The output from
CFE_SB_ReceiveBuffer()
is a pointer to a shared buffer, and thus should be interpreted asconst
data. The only reason it is not qualifiedconst
in the API was due to backward compatibility concerns.However, CF is actually writing to the buffer in two places.
To Reproduce
Send those commands
Expected behavior
Should not write to a buffer that was received from SB
Code snips
CF/fsw/src/cf_cmd.c
Lines 147 to 149 in a0d35e1
CF/fsw/src/cf_cmd.c
Lines 190 to 192 in a0d35e1
System observed on:
Inspection
Additional context
This is done to ensure null termination of the string. While a valid concern, a function like CFE_SB_MessageStringGet() should be used instead.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: