{\r
CONST CHAR16 *WorkingPath;\r
CONST CHAR16 *InputPath;\r
+ CHAR16 *CharPtr;\r
CHAR16 *InputFileSystem;\r
UINTN FileSystemCharCount;\r
CHAR16 *FullyQualifiedPath;\r
// truncate the new path after the file system part.\r
//\r
StrCpyS(FullyQualifiedPath, Size/sizeof(CHAR16), WorkingPath);\r
- *(StrStr(FullyQualifiedPath, L":") + 1) = CHAR_NULL;\r
+ CharPtr = StrStr(FullyQualifiedPath, L":");\r
+ if (CharPtr != NULL) {\r
+ *(CharPtr + 1) = CHAR_NULL;\r
+ }\r
} else {\r
//\r
// Relative path: start with the working directory and append "\".\r