diff --git a/modules/fs/fsw/src/cfe_fs_api.c b/modules/fs/fsw/src/cfe_fs_api.c index fbd0e54a0..c382b5e8b 100644 --- a/modules/fs/fsw/src/cfe_fs_api.c +++ b/modules/fs/fsw/src/cfe_fs_api.c @@ -405,8 +405,17 @@ int32 CFE_FS_ParseInputFileNameEx(char *OutputBuffer, const char *InputBuffer, s /* If input buffer is not empty, then use it, otherwise use DefaultInput */ if (InputBuffer != NULL && InputBufSize > 0 && InputBuffer[0] != 0) { + InputPtr = memchr(InputBuffer, 0, InputBufSize); + if (InputPtr != NULL) + { + InputLen = InputPtr - InputBuffer; + } + else + { + InputLen = InputBufSize; + } + InputPtr = InputBuffer; - InputLen = InputBufSize; } else if (DefaultInput != NULL) {