diff options
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r-- | ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c b/ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c index d04a797..3200385 100644 --- a/ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c +++ b/ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c @@ -668,6 +668,7 @@ StrnCatGrowLeft ( ){
UINTN DestinationStartSize;
UINTN NewSize;
+ UINTN CopySize;
//
// ASSERTs
@@ -714,7 +715,8 @@ StrnCatGrowLeft ( *Destination = AllocateZeroPool((Count+1)*sizeof(CHAR16));
}
- *Destination = CopyMem((*Destination)+StrLen(Source), *Destination, StrSize(*Destination));
+ CopySize = StrSize(*Destination);
+ *Destination = CopyMem((*Destination)+StrLen(Source), *Destination, CopySize);
*Destination = CopyMem(*Destination, Source, StrLen(Source));
return (*Destination);
}
|