Skip to content

Commit

Permalink
Fix nasa#2436, Adds an empty string or null pointer check for pipe cr…
Browse files Browse the repository at this point in the history
…eation
  • Loading branch information
jdfiguer authored and jdfiguer committed Sep 6, 2023
1 parent 798d557 commit 7c78164
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/sb/fsw/src/cfe_sb_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ CFE_Status_t CFE_SB_CreatePipe(CFE_SB_PipeId_t *PipeIdPtr, uint16 Depth, const c
CFE_ES_GetTaskID(&TskId);

/* check input parameters */
if ((PipeIdPtr == NULL) || (Depth > OS_QUEUE_MAX_DEPTH) || (Depth == 0))
if ((PipeIdPtr == NULL) || (Depth > OS_QUEUE_MAX_DEPTH) || (Depth == 0) || PipeName == NULL || PipeName[0] == '\0')
{
PendingEventId = CFE_SB_CR_PIPE_BAD_ARG_EID;
Status = CFE_SB_BAD_ARGUMENT;
Expand Down

0 comments on commit 7c78164

Please sign in to comment.