Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #932 and #1089, strncpy cleanup and UT updates for mission sizing of API_LEN and PATH_LEN #1098

Merged
merged 3 commits into from
Jan 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions fsw/cfe-core/src/es/cfe_es_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ int32 CFE_ES_GetAppName(char *AppName, CFE_ES_ResourceID_t AppId, size_t BufferL
*/
if (CFE_ES_AppRecordIsMatch(AppRecPtr, AppId))
{
strncpy(AppName, CFE_ES_AppRecordGetName(AppRecPtr), BufferLength);
strncpy(AppName, CFE_ES_AppRecordGetName(AppRecPtr), BufferLength - 1);
AppName[BufferLength - 1] = '\0';
Result = CFE_SUCCESS;
}
Expand Down Expand Up @@ -1306,8 +1306,8 @@ int32 CFE_ES_CreateChildTask(CFE_ES_ResourceID_t *TaskIdPtr,

CFE_ES_TaskRecordSetUsed(TaskRecPtr, ChildTaskId);
TaskRecPtr->AppId = CFE_ES_AppRecordGetID(AppRecPtr);
strncpy((char *)TaskRecPtr->TaskName,TaskName,OS_MAX_API_NAME);
TaskRecPtr->TaskName[OS_MAX_API_NAME - 1] = '\0';
strncpy(TaskRecPtr->TaskName,TaskName,sizeof(TaskRecPtr->TaskName) - 1);
TaskRecPtr->TaskName[sizeof(TaskRecPtr->TaskName) - 1] = '\0';
CFE_ES_Global.RegisteredTasks++;

*TaskIdPtr = ChildTaskId;
Expand Down Expand Up @@ -1737,8 +1737,8 @@ int32 CFE_ES_RegisterCDS(CFE_ES_CDSHandle_t *CDSHandlePtr, size_t BlockSize, con

/* Perform a buffer overrun safe copy of name for debug log message */

strncpy(CDSName, Name, CFE_MISSION_ES_CDS_MAX_NAME_LENGTH);
CDSName[CFE_MISSION_ES_CDS_MAX_NAME_LENGTH-1] = '\0';
strncpy(CDSName, Name, sizeof(CDSName) - 1);
CDSName[sizeof(CDSName) - 1] = '\0';
CFE_ES_WriteToSysLog("CFE_CDS:Register-CDS Name (%s) is too long\n", CDSName);
}
else
Expand Down Expand Up @@ -1925,7 +1925,8 @@ int32 CFE_ES_RegisterGenCounter(CFE_ES_ResourceID_t *CounterIdPtr, const char *C
else
{
strncpy(CountRecPtr->CounterName,CounterName,
sizeof(CountRecPtr->CounterName));
sizeof(CountRecPtr->CounterName) - 1);
CountRecPtr->CounterName[sizeof(CountRecPtr->CounterName) - 1] = '\0';
CountRecPtr->Counter = 0;
CFE_ES_CounterRecordSetUsed(CountRecPtr, PendingCounterId);
CFE_ES_Global.LastCounterId = PendingCounterId;
Expand Down
7 changes: 7 additions & 0 deletions fsw/cfe-core/src/es/cfe_es_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,12 +707,16 @@ int32 CFE_ES_AppCreate(CFE_ES_ResourceID_t *ApplicationIdPtr,
AppRecPtr->Type = CFE_ES_AppType_EXTERNAL;
strncpy(AppRecPtr->StartParams.BasicInfo.Name, AppName,
sizeof(AppRecPtr->StartParams.BasicInfo.Name)-1);
AppRecPtr->StartParams.BasicInfo.Name[sizeof(AppRecPtr->StartParams.BasicInfo.Name)-1] = '\0';
strncpy(AppRecPtr->StartParams.BasicInfo.FileName, FileName,
sizeof(AppRecPtr->StartParams.BasicInfo.FileName)-1);
AppRecPtr->StartParams.BasicInfo.FileName[sizeof(AppRecPtr->StartParams.BasicInfo.FileName)-1] = '\0';
if (EntryPointName != NULL && strcmp(EntryPointName, "NULL") != 0)
{
strncpy(AppRecPtr->StartParams.BasicInfo.EntryPoint, EntryPointName,
sizeof(AppRecPtr->StartParams.BasicInfo.EntryPoint)-1);
AppRecPtr->StartParams.BasicInfo.EntryPoint[
sizeof(AppRecPtr->StartParams.BasicInfo.EntryPoint)-1] = '\0';
}

AppRecPtr->StartParams.StackSize = StackSize;
Expand Down Expand Up @@ -883,12 +887,15 @@ int32 CFE_ES_LoadLibrary(CFE_ES_ResourceID_t *LibraryIdPtr,
*/
strncpy(LibSlotPtr->BasicInfo.Name, LibName,
sizeof(LibSlotPtr->BasicInfo.Name)-1);
LibSlotPtr->BasicInfo.Name[sizeof(LibSlotPtr->BasicInfo.Name)-1] = '\0';
strncpy(LibSlotPtr->BasicInfo.FileName, FileName,
sizeof(LibSlotPtr->BasicInfo.FileName)-1);
LibSlotPtr->BasicInfo.FileName[sizeof(LibSlotPtr->BasicInfo.FileName)-1] = '\0';
if (EntryPointName != NULL && strcmp(EntryPointName, "NULL") != 0)
{
strncpy(LibSlotPtr->BasicInfo.EntryPoint, EntryPointName,
sizeof(LibSlotPtr->BasicInfo.EntryPoint)-1);
LibSlotPtr->BasicInfo.EntryPoint[sizeof(LibSlotPtr->BasicInfo.EntryPoint)-1] = '\0';
}

CFE_ES_LibRecordSetUsed(LibSlotPtr, CFE_ES_RESOURCEID_RESERVED);
Expand Down
3 changes: 2 additions & 1 deletion fsw/cfe-core/src/es/cfe_es_erlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ int32 CFE_ES_WriteToERLogWithContext( CFE_ES_LogEntryType_Enum_t EntryType, ui
/*
** Copy the Description string to the log.
*/
strncpy(EntryPtr->BaseInfo.Description, Description, sizeof(EntryPtr->BaseInfo.Description));
strncpy(EntryPtr->BaseInfo.Description, Description, sizeof(EntryPtr->BaseInfo.Description) - 1);
EntryPtr->BaseInfo.Description[sizeof(EntryPtr->BaseInfo.Description) - 1] = '\0';

/*
* Store the context info (if any)
Expand Down
1 change: 1 addition & 0 deletions fsw/cfe-core/src/es/cfe_es_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ void CFE_ES_CreateObjects(void)
AppRecPtr->Type = CFE_ES_AppType_CORE;
strncpy(AppRecPtr->StartParams.BasicInfo.Name, CFE_ES_ObjectTable[i].ObjectName,
sizeof(AppRecPtr->StartParams.BasicInfo.Name)-1);
AppRecPtr->StartParams.BasicInfo.Name[sizeof(AppRecPtr->StartParams.BasicInfo.Name)-1] = '\0';

/* FileName and EntryPoint is not valid for core apps */
AppRecPtr->StartParams.StackSize = CFE_ES_ObjectTable[i].ObjectSize;
Expand Down
15 changes: 3 additions & 12 deletions fsw/cfe-core/src/es/cfe_es_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,6 @@ int32 CFE_ES_TaskInit(void)
CFE_ES_TaskData.CommandCounter = 0;
CFE_ES_TaskData.CommandErrorCounter = 0;

/*
** Initialize task configuration data
*/
strcpy(CFE_ES_TaskData.PipeName, "ES_CMD_PIPE");
CFE_ES_TaskData.PipeDepth = 12;

CFE_ES_TaskData.LimitHK = 2;
CFE_ES_TaskData.LimitCmd = 4;

/*
** Initialize systemlog to default Power On or Processor Reset mode
*/
Expand Down Expand Up @@ -271,7 +262,7 @@ int32 CFE_ES_TaskInit(void)
/*
** Create Software Bus message pipe
*/
Status = CFE_SB_CreatePipe(&CFE_ES_TaskData.CmdPipe, CFE_ES_TaskData.PipeDepth, CFE_ES_TaskData.PipeName);
Status = CFE_SB_CreatePipe(&CFE_ES_TaskData.CmdPipe, CFE_ES_PIPE_DEPTH, CFE_ES_PIPE_NAME);
if ( Status != CFE_SUCCESS )
{
CFE_ES_WriteToSysLog("ES:Cannot Create SB Pipe, RC = 0x%08X\n", (unsigned int)Status);
Expand All @@ -282,7 +273,7 @@ int32 CFE_ES_TaskInit(void)
** Subscribe to Housekeeping request commands
*/
Status = CFE_SB_SubscribeEx(CFE_SB_ValueToMsgId(CFE_ES_SEND_HK_MID), CFE_ES_TaskData.CmdPipe,
CFE_SB_Default_Qos, CFE_ES_TaskData.LimitHK);
CFE_SB_Default_Qos, CFE_ES_LIMIT_HK);
if ( Status != CFE_SUCCESS )
{
CFE_ES_WriteToSysLog("ES:Cannot Subscribe to HK packet, RC = 0x%08X\n", (unsigned int)Status);
Expand All @@ -293,7 +284,7 @@ int32 CFE_ES_TaskInit(void)
** Subscribe to ES task ground command packets
*/
Status = CFE_SB_SubscribeEx(CFE_SB_ValueToMsgId(CFE_ES_CMD_MID), CFE_ES_TaskData.CmdPipe,
CFE_SB_Default_Qos, CFE_ES_TaskData.LimitCmd);
CFE_SB_Default_Qos, CFE_ES_LIMIT_CMD);
if ( Status != CFE_SUCCESS )
{
CFE_ES_WriteToSysLog("ES:Cannot Subscribe to ES ground commands, RC = 0x%08X\n", (unsigned int)Status);
Expand Down
8 changes: 5 additions & 3 deletions fsw/cfe-core/src/es/cfe_es_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@

/*************************************************************************/

#define CFE_ES_PIPE_NAME "ES_CMD_PIPE"
#define CFE_ES_PIPE_DEPTH 12
#define CFE_ES_LIMIT_HK 2
#define CFE_ES_LIMIT_CMD 4

/*
** ES File descriptions
*/
Expand Down Expand Up @@ -123,9 +128,6 @@ typedef struct
/*
** ES Task initialization data (not reported in housekeeping)
*/
char PipeName[OS_MAX_API_NAME];
uint16 PipeDepth;

uint8 LimitHK;
uint8 LimitCmd;

Expand Down
8 changes: 4 additions & 4 deletions fsw/cfe-core/src/sb/cfe_sb_priv.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ char *CFE_SB_GetAppTskName(CFE_ES_ResourceID_t TaskId,char *FullName){
}else{

/* AppName and TskName buffers and strncpy are needed to limit string sizes */
strncpy(AppName,(char *)ptr->AppName,OS_MAX_API_NAME-1);
AppName[OS_MAX_API_NAME-1] = '\0';
strncpy(TskName,(char *)ptr->TaskName,OS_MAX_API_NAME-1);
TskName[OS_MAX_API_NAME-1] = '\0';
strncpy(AppName,(char *)ptr->AppName,sizeof(AppName)-1);
AppName[sizeof(AppName)-1] = '\0';
strncpy(TskName,(char *)ptr->TaskName,sizeof(TskName)-1);
TskName[sizeof(TskName)-1] = '\0';

sprintf(FullName,"%s.%s",AppName,TskName);

Expand Down
27 changes: 17 additions & 10 deletions fsw/cfe-core/src/tbl/cfe_tbl_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ int32 CFE_TBL_Register( CFE_TBL_Handle_t *TblHandlePtr,
Status = CFE_TBL_ERR_INVALID_NAME;

/* Perform a buffer overrun safe copy of name for debug log message */
strncpy(TblName, Name, CFE_MISSION_TBL_MAX_NAME_LENGTH);
TblName[CFE_MISSION_TBL_MAX_NAME_LENGTH-1] = '\0';
strncpy(TblName, Name, sizeof(TblName) - 1);
TblName[sizeof(TblName) - 1] = '\0';
CFE_ES_WriteToSysLog("CFE_TBL:Register-Table Name (%s) is bad length (%d)",TblName,(int)NameLen);
}
else
Expand Down Expand Up @@ -314,7 +314,8 @@ int32 CFE_TBL_Register( CFE_TBL_Handle_t *TblHandlePtr,
RegRecPtr->ValidationFuncPtr = TblValidationFuncPtr;

/* Save Table Name in Registry */
strncpy(RegRecPtr->Name, TblName, CFE_TBL_MAX_FULL_NAME_LEN);
strncpy(RegRecPtr->Name, TblName, sizeof(RegRecPtr->Name) - 1);
RegRecPtr->Name[sizeof(RegRecPtr->Name) - 1] = '\0';

/* Set the "Dump Only" flag to value based upon selected option */
if ((TblOptionFlags & CFE_TBL_OPT_LD_DMP_MSK) == CFE_TBL_OPT_DUMP_ONLY)
Expand Down Expand Up @@ -398,10 +399,14 @@ int32 CFE_TBL_Register( CFE_TBL_Handle_t *TblHandlePtr,

if ((CritRegRecPtr != NULL) && (CritRegRecPtr->TableLoadedOnce))
{
strncpy(WorkingBufferPtr->DataSource, CritRegRecPtr->LastFileLoaded, OS_MAX_PATH_LEN);
strncpy(WorkingBufferPtr->DataSource, CritRegRecPtr->LastFileLoaded,
sizeof(WorkingBufferPtr->DataSource) - 1);
WorkingBufferPtr->DataSource[sizeof(WorkingBufferPtr->DataSource) - 1] = '\0';
WorkingBufferPtr->FileCreateTimeSecs = CritRegRecPtr->FileCreateTimeSecs;
WorkingBufferPtr->FileCreateTimeSubSecs = CritRegRecPtr->FileCreateTimeSubSecs;
strncpy(RegRecPtr->LastFileLoaded, CritRegRecPtr->LastFileLoaded, OS_MAX_PATH_LEN);
strncpy(RegRecPtr->LastFileLoaded, CritRegRecPtr->LastFileLoaded,
sizeof(RegRecPtr->LastFileLoaded) - 1);
RegRecPtr->LastFileLoaded[sizeof(RegRecPtr->LastFileLoaded) - 1] = '\0';
RegRecPtr->TimeOfLastUpdate.Seconds = CritRegRecPtr->TimeOfLastUpdate.Seconds;
RegRecPtr->TimeOfLastUpdate.Subseconds = CritRegRecPtr->TimeOfLastUpdate.Subseconds;
RegRecPtr->TableLoadedOnce = CritRegRecPtr->TableLoadedOnce;
Expand Down Expand Up @@ -441,7 +446,8 @@ int32 CFE_TBL_Register( CFE_TBL_Handle_t *TblHandlePtr,
if (CritRegRecPtr != NULL)
{
CritRegRecPtr->CDSHandle = RegRecPtr->CDSHandle;
strncpy(CritRegRecPtr->Name, TblName, CFE_TBL_MAX_FULL_NAME_LEN);
strncpy(CritRegRecPtr->Name, TblName, sizeof(CritRegRecPtr->Name) - 1);
CritRegRecPtr->Name[sizeof(CritRegRecPtr->Name) - 1] = '\0';
CritRegRecPtr->FileCreateTimeSecs = 0;
CritRegRecPtr->FileCreateTimeSubSecs = 0;
CritRegRecPtr->LastFileLoaded[0] = '\0';
Expand Down Expand Up @@ -874,7 +880,8 @@ int32 CFE_TBL_Load( CFE_TBL_Handle_t TblHandle,
/* On initial loads, make sure registry is given file/address of data source */
strncpy(RegRecPtr->LastFileLoaded,
WorkingBufferPtr->DataSource,
OS_MAX_PATH_LEN);
sizeof(RegRecPtr->LastFileLoaded) - 1);
RegRecPtr->LastFileLoaded[sizeof(RegRecPtr->LastFileLoaded) - 1] = '\0';

CFE_TBL_NotifyTblUsersOfUpdate(RegRecPtr);

Expand Down Expand Up @@ -1494,7 +1501,7 @@ int32 CFE_TBL_Modified( CFE_TBL_Handle_t TblHandle )

/* Keep a record of change for the ground operators reference */
RegRecPtr->TimeOfLastUpdate = CFE_TIME_GetTime();
RegRecPtr->LastFileLoaded[OS_MAX_PATH_LEN-1] = '\0';
RegRecPtr->LastFileLoaded[sizeof(RegRecPtr->LastFileLoaded)-1] = '\0';

/* Update CRC on contents of table */
RegRecPtr->Buffers[RegRecPtr->ActiveBufferIndex].Crc =
Expand All @@ -1504,13 +1511,13 @@ int32 CFE_TBL_Modified( CFE_TBL_Handle_t TblHandle )
CFE_MISSION_ES_DEFAULT_CRC);

FilenameLen = strlen(RegRecPtr->LastFileLoaded);
if (FilenameLen < (OS_MAX_PATH_LEN-4))
if (FilenameLen < (sizeof(RegRecPtr->LastFileLoaded)-4))
{
strncpy(&RegRecPtr->LastFileLoaded[FilenameLen], "(*)", 4);
}
else
{
strncpy(&RegRecPtr->LastFileLoaded[(OS_MAX_PATH_LEN-4)], "(*)", 4);
strncpy(&RegRecPtr->LastFileLoaded[sizeof(RegRecPtr->LastFileLoaded)-4], "(*)", 4);
}

AccessIterator = RegRecPtr->HeadOfAccessList;
Expand Down
10 changes: 6 additions & 4 deletions fsw/cfe-core/src/tbl/cfe_tbl_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,8 +1002,8 @@ int32 CFE_TBL_LoadFromFile(const char *AppName, CFE_TBL_LoadBuff_t *WorkingBuffe
return CFE_TBL_ERR_FILE_TOO_LARGE;
}

memset(WorkingBufferPtr->DataSource, 0, OS_MAX_PATH_LEN);
strncpy(WorkingBufferPtr->DataSource, Filename, OS_MAX_PATH_LEN);
memset(WorkingBufferPtr->DataSource, 0, sizeof(WorkingBufferPtr->DataSource));
strncpy(WorkingBufferPtr->DataSource, Filename, sizeof(WorkingBufferPtr->DataSource) - 1);

/* Save file creation time for later storage into Registry */
WorkingBufferPtr->FileCreateTimeSecs = StdFileHeader.TimeSeconds;
Expand Down Expand Up @@ -1054,7 +1054,8 @@ int32 CFE_TBL_UpdateInternal( CFE_TBL_Handle_t TblHandle,
/* However, we need to copy it into active registry area */
strncpy(RegRecPtr->LastFileLoaded,
RegRecPtr->Buffers[RegRecPtr->ActiveBufferIndex].DataSource,
OS_MAX_PATH_LEN);
sizeof(RegRecPtr->LastFileLoaded) - 1);
RegRecPtr->LastFileLoaded[sizeof(RegRecPtr->LastFileLoaded) - 1] = '\0';

CFE_TBL_NotifyTblUsersOfUpdate(RegRecPtr);

Expand Down Expand Up @@ -1470,7 +1471,8 @@ void CFE_TBL_UpdateCriticalTblCDS(CFE_TBL_RegistryRec_t *RegRecPtr)
/* Save information related to the source of the data stored in the table in Critical Table Registry */
CritRegRecPtr->FileCreateTimeSecs = RegRecPtr->Buffers[RegRecPtr->ActiveBufferIndex].FileCreateTimeSecs;
CritRegRecPtr->FileCreateTimeSubSecs = RegRecPtr->Buffers[RegRecPtr->ActiveBufferIndex].FileCreateTimeSubSecs;
strncpy(CritRegRecPtr->LastFileLoaded, RegRecPtr->LastFileLoaded, OS_MAX_PATH_LEN);
strncpy(CritRegRecPtr->LastFileLoaded, RegRecPtr->LastFileLoaded, sizeof(CritRegRecPtr->LastFileLoaded) - 1);
CritRegRecPtr->LastFileLoaded[sizeof(CritRegRecPtr->LastFileLoaded) - 1] = '\0';
CritRegRecPtr->TimeOfLastUpdate = RegRecPtr->TimeOfLastUpdate;
CritRegRecPtr->TableLoadedOnce = RegRecPtr->TableLoadedOnce;

Expand Down
8 changes: 1 addition & 7 deletions fsw/cfe-core/src/tbl/cfe_tbl_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ int32 CFE_TBL_TaskInit(void)
/*
** Create Software Bus message pipe
*/
Status = CFE_SB_CreatePipe(&CFE_TBL_TaskData.CmdPipe,
CFE_TBL_TaskData.PipeDepth,
CFE_TBL_TaskData.PipeName);
Status = CFE_SB_CreatePipe(&CFE_TBL_TaskData.CmdPipe, CFE_TBL_TASK_PIPE_DEPTH, CFE_TBL_TASK_PIPE_NAME);
if(Status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("TBL:Error creating cmd pipe:RC=0x%08X\n",(unsigned int)Status);
Expand Down Expand Up @@ -241,10 +239,6 @@ void CFE_TBL_InitData(void)
/* Get the assigned Application ID for the Table Services Task */
CFE_ES_GetAppID(&CFE_TBL_TaskData.TableTaskAppId);

/* Initialize Command Pipe Parameters */
CFE_TBL_TaskData.PipeDepth = CFE_TBL_TASK_PIPE_DEPTH;
strncpy(CFE_TBL_TaskData.PipeName, CFE_TBL_TASK_PIPE_NAME, 16);

/* Initialize Packet Headers */
CFE_MSG_Init(&CFE_TBL_TaskData.HkPacket.TlmHeader.Msg,
CFE_SB_ValueToMsgId(CFE_TBL_HK_TLM_MID),
Expand Down
2 changes: 0 additions & 2 deletions fsw/cfe-core/src/tbl/cfe_tbl_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@ typedef struct
/*
** Task initialization data (not reported in housekeeping)...
*/
char PipeName[16]; /**< \brief Contains name of Table Task command pipe */
uint16 PipeDepth; /**< \brief Contains depth of Table Task command pipe */
CFE_ES_ResourceID_t TableTaskAppId; /**< \brief Contains Table Task Application ID as assigned by OS AL */

int16 HkTlmTblRegIndex; /**< \brief Index of table registry entry to be telemetered with Housekeeping */
Expand Down
8 changes: 6 additions & 2 deletions fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,13 @@ int32 CFE_TBL_LoadCmd(const CFE_TBL_LoadCmd_t *data)

/* Save file information statistics for housekeeping telemetry */
strncpy(CFE_TBL_TaskData.HkPacket.Payload.LastFileLoaded, LoadFilename,
sizeof(CFE_TBL_TaskData.HkPacket.Payload.LastFileLoaded));
sizeof(CFE_TBL_TaskData.HkPacket.Payload.LastFileLoaded) - 1);
CFE_TBL_TaskData.HkPacket.Payload.LastFileLoaded[
sizeof(CFE_TBL_TaskData.HkPacket.Payload.LastFileLoaded) - 1] = '\0';
strncpy(CFE_TBL_TaskData.HkPacket.Payload.LastTableLoaded, TblFileHeader.TableName,
sizeof(CFE_TBL_TaskData.HkPacket.Payload.LastTableLoaded));
sizeof(CFE_TBL_TaskData.HkPacket.Payload.LastTableLoaded) - 1);
CFE_TBL_TaskData.HkPacket.Payload.LastTableLoaded[
sizeof(CFE_TBL_TaskData.HkPacket.Payload.LastTableLoaded) - 1] = '\0';

/* Increment successful command completion counter */
ReturnCode = CFE_TBL_INC_CMD_CTR;
Expand Down
4 changes: 1 addition & 3 deletions fsw/cfe-core/src/time/cfe_time_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,7 @@ int32 CFE_TIME_TaskInit(void)
}/* end if */


Status = CFE_SB_CreatePipe(&CFE_TIME_TaskData.CmdPipe,
CFE_TIME_TaskData.PipeDepth,
CFE_TIME_TaskData.PipeName);
Status = CFE_SB_CreatePipe(&CFE_TIME_TaskData.CmdPipe, CFE_TIME_TASK_PIPE_DEPTH, CFE_TIME_TASK_PIPE_NAME);
if(Status != CFE_SUCCESS)
{
CFE_ES_WriteToSysLog("TIME:Error creating cmd pipe:RC=0x%08X\n",(unsigned int)Status);
Expand Down
3 changes: 0 additions & 3 deletions fsw/cfe-core/src/time/cfe_time_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,6 @@ void CFE_TIME_InitData(void)
/*
** Initialize task configuration data...
*/
strcpy(CFE_TIME_TaskData.PipeName, CFE_TIME_TASK_PIPE_NAME);
CFE_TIME_TaskData.PipeDepth = CFE_TIME_TASK_PIPE_DEPTH;

memset((void*)CFE_TIME_TaskData.ReferenceState, 0, sizeof(CFE_TIME_TaskData.ReferenceState));
for (i = 0; i < CFE_TIME_REFERENCE_BUF_DEPTH; ++i)
{
Expand Down
3 changes: 0 additions & 3 deletions fsw/cfe-core/src/time/cfe_time_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ typedef struct
/*
** Task initialization data (not reported in housekeeping)...
*/
char PipeName[16];
uint16 PipeDepth;

int16 ClockSource;
int16 ClockSignal;
int16 ServerFlyState;
Expand Down
Loading