Skip to content

Commit

Permalink
Fix nasa#1016, bogus warning in strncpy
Browse files Browse the repository at this point in the history
Add an extra write of a null char which squelches a warning.
  • Loading branch information
jphickey committed Nov 16, 2020
1 parent 32f3dee commit 5eba09e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fsw/cfe-core/src/es/cfe_es_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ int32 CFE_ES_StartAppTask(const CFE_ES_AppStartParams_t* StartParams, CFE_ES_Res

TaskRecPtr->AppId = RefAppId;
strncpy(TaskRecPtr->TaskName, StartParams->BasicInfo.Name, sizeof(TaskRecPtr->TaskName)-1);
TaskRecPtr->TaskName[sizeof(TaskRecPtr->TaskName)-1] = 0;
CFE_ES_TaskRecordSetUsed(TaskRecPtr, TaskId);

/*
Expand Down

0 comments on commit 5eba09e

Please sign in to comment.