Skip to content

Commit

Permalink
Fix nasa#71, Adds JSC 2.1 Static Analysis comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jdfiguer authored and jdfiguer committed Jun 10, 2024
1 parent 72242ea commit 5a5e794
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fsw/src/md_dwell_tbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ CFE_Status_t MD_UpdateTableDwellEntry(uint16 TableIndex, uint16 EntryIndex, uint
strncpy(EntryPtr->DwellAddress.SymName, NewDwellAddress.SymName, OS_MAX_SYM_LEN - 1);

/* Ensure string is null terminated. */
/* SAD: SymName’s last element is accessed on this line by reference to its max size, greatly reducing an off by one risk */
EntryPtr->DwellAddress.SymName[OS_MAX_SYM_LEN - 1] = '\0';

/* Notify Table Services that buffer was modified */
Expand Down

0 comments on commit 5a5e794

Please sign in to comment.