Allocate and copy the appropriate amount of memory
This commit is contained in:
parent
9aaf8ddb68
commit
aa4f917fa7
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user