This issue was imported from the GSFC issue tracking system
Imported from: [GSFCCFS-1783] CF test passing uninitialized buffer to input-only parameter
Originally submitted by: Hickey, Joseph P. (GSFC-582.0)[VANTAGE SYSTEMS INC] on Tue Nov 16 17:16:22 2021
Original Description:
The test function Test_CF_CFDP_CopyDataToLv_FailsBecause_len_IsEqTo_sizeof_dest_lv_data_Returns_neg1 calls 'CF_CFDP_CopyDataToLv' but passes an uninitialized buffer (arg_data) to the function when this parameter is documented as input only.
The test passes because the value happens to be a "don't-care" in this case, so it does not affect the outcome/operation, but its bad practice to pass uninitialized data to an input, and also some compilers will generate a warning about this too.
Interestingly, the call to 'AnyBufferOf_uint8_WithSize' which would have initialized this, is commented out. This may be a simple mistake - uncommenting this line will resolve the error.
This issue was imported from the GSFC issue tracking system
Imported from: [GSFCCFS-1783] CF test passing uninitialized buffer to input-only parameter
Originally submitted by: Hickey, Joseph P. (GSFC-582.0)[VANTAGE SYSTEMS INC] on Tue Nov 16 17:16:22 2021
Original Description:
The test function Test_CF_CFDP_CopyDataToLv_FailsBecause_len_IsEqTo_sizeof_dest_lv_data_Returns_neg1 calls 'CF_CFDP_CopyDataToLv' but passes an uninitialized buffer (arg_data) to the function when this parameter is documented as input only.
The test passes because the value happens to be a "don't-care" in this case, so it does not affect the outcome/operation, but its bad practice to pass uninitialized data to an input, and also some compilers will generate a warning about this too.
Interestingly, the call to 'AnyBufferOf_uint8_WithSize' which would have initialized this, is commented out. This may be a simple mistake - uncommenting this line will resolve the error.