){\r
if (UnicodeCollation->MetaiMatch(UnicodeCollation, (CHAR16*)ShellInfoNode->FileName, CurrentFilePattern)){\r
if (ShellInfoNode->FullName != NULL && StrStr(ShellInfoNode->FullName, L":") == NULL) {\r
- Size = StrSize(ShellInfoNode->FullName);\r
- Size += StrSize(MapName) + sizeof(CHAR16);\r
+ Size = StrSize (ShellInfoNode->FullName) + StrSize (MapName);\r
NewFullName = AllocateZeroPool(Size);\r
if (NewFullName == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
} else {\r
- StrCpyS(NewFullName, Size/sizeof(CHAR16), MapName);\r
- StrCatS(NewFullName, Size/sizeof(CHAR16), ShellInfoNode->FullName+1);\r
- FreePool((VOID*)ShellInfoNode->FullName);\r
+ StrCpyS(NewFullName, Size / sizeof(CHAR16), MapName);\r
+ StrCatS(NewFullName, Size / sizeof(CHAR16), ShellInfoNode->FullName);\r
+ FreePool ((VOID *) ShellInfoNode->FullName);\r
ShellInfoNode->FullName = NewFullName;\r
}\r
}\r
\r
PatternCopy = PathCleanUpDirectories(PatternCopy);\r
\r
- Count = StrStr(PatternCopy, L":") - PatternCopy;\r
- Count += 2;\r
+ Count = StrStr(PatternCopy, L":") - PatternCopy + 1;\r
+ ASSERT (Count <= StrLen (PatternCopy));\r
\r
ASSERT(MapName == NULL);\r
MapName = StrnCatGrow(&MapName, NULL, PatternCopy, Count);\r