Skip to content

Commit

Permalink
Merge pull request #2568 from chillfig:SA_jsc2_1
Browse files Browse the repository at this point in the history
Fix #2552, Adds JSC 2.1 Static Analysis comments
  • Loading branch information
dzbaker committed Jul 1, 2024
2 parents 4990c4e + 0dc799d commit 653c058
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
- msg api test buffer overrun
- See <2551>, <2381>, and <2537>

## Development Build: equuleus-rc1+dev137
- msg api test buffer overrun
- send CMake message to stdout instead of stderr
- See <https://github.com/nasa/cFE/pull/2537> and <https://github.com/nasa/cFE/pull/2525>

## Development Build: equuleus-rc1+dev131
- add handle list operation routines
- See <https://github.com/nasa/cFE/pull/2548>
Expand Down
2 changes: 1 addition & 1 deletion cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ function(process_arch SYSVAR)
if (FILESRC)
# In case the file is a symlink, follow it to get to the actual file
get_filename_component(FILESRC "${FILESRC}" REALPATH)
message("NOTE: Selected ${FILESRC} as source for ${INSTFILE} on ${TGTNAME}")
message(STATUS "NOTE: Selected ${FILESRC} as source for ${INSTFILE} on ${TGTNAME}")
install(FILES ${FILESRC} DESTINATION ${TGTNAME}/${INSTALL_SUBDIR} RENAME ${INSTFILE})
else(FILESRC)
message("WARNING: Install file ${INSTFILE} for ${TGTNAME} not found")
Expand Down
1 change: 1 addition & 0 deletions modules/evs/fsw/src/cfe_evs_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ void EVS_SendViaPorts(CFE_EVS_LongEventTlm_t *EVS_PktPtr)
CFE_MSG_GetMsgTime(CFE_MSG_PTR(EVS_PktPtr->TelemetryHeader), &PktTime);
CFE_TIME_Print(TimeBuffer, PktTime);

/* SAD: No need to check snprintf return; CFE_EVS_MAX_PORT_MSG_LENGTH is sized to accommodate buffer limits */
snprintf(PortMessage, sizeof(PortMessage), "%s %u/%u/%s %u: %s", TimeBuffer,
(unsigned int)EVS_PktPtr->Payload.PacketID.SpacecraftID,
(unsigned int)EVS_PktPtr->Payload.PacketID.ProcessorID, EVS_PktPtr->Payload.PacketID.AppName,
Expand Down
1 change: 1 addition & 0 deletions modules/fs/fsw/src/cfe_fs_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ void CFE_FS_ByteSwapUint32(uint32 *Uint32ToSwapPtr)
char *InPtr = (char *)&Temp;
char *OutPtr = (char *)Uint32ToSwapPtr;

/* SAD: Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers. */
OutPtr[0] = InPtr[3];
OutPtr[1] = InPtr[2];
OutPtr[2] = InPtr[1];
Expand Down
1 change: 1 addition & 0 deletions modules/tbl/fsw/src/cfe_tbl_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,7 @@ void CFE_TBL_ByteSwapUint32(uint32 *Uint32ToSwapPtr)
char *InPtr = (char *)&Temp;
char *OutPtr = (char *)Uint32ToSwapPtr;

/* SAD: Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers. */
OutPtr[0] = InPtr[3];
OutPtr[1] = InPtr[2];
OutPtr[2] = InPtr[1];
Expand Down

0 comments on commit 653c058

Please sign in to comment.