Allocate and copy the appropriate amount of memory
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 30s
Builds / ExectOS (i686) (push) Successful in 44s

This commit is contained in:
Rafal Kupiec 2023-12-30 19:57:41 +01:00
parent 9aaf8ddb68
commit aa4f917fa7
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -839,8 +839,8 @@ BlpDissectVolumeArcPath(IN PWCHAR SystemPath,
/* Store ARC name if possible */ /* Store ARC name if possible */
if(ArcName) if(ArcName)
{ {
BlMemoryAllocatePool(ArcLength, (PVOID *)&LocalArcName); BlMemoryAllocatePool(ArcLength * sizeof(WCHAR), (PVOID *)&LocalArcName);
RtlCopyMemory(LocalArcName, SystemPath, ArcLength); RtlCopyMemory(LocalArcName, SystemPath, ArcLength * sizeof(WCHAR));
LocalArcName[ArcLength] = '\0'; LocalArcName[ArcLength] = '\0';
*ArcName = LocalArcName; *ArcName = LocalArcName;
} }