mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
[KERNEL32]
- Fix an off-by-one in the UNC case in WaitNamedPipeW - Some readability svn path=/trunk/; revision=60093
This commit is contained in:
parent
dd79f09da8
commit
fb0811a01f
1 changed files with 5 additions and 4 deletions
|
@ -415,8 +415,9 @@ WaitNamedPipeW(LPCWSTR lpNamedPipeName,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Move past it */
|
/* Move past it */
|
||||||
NewName.Buffer += 9;
|
NewName.Buffer += PipePrefix.Length / sizeof(WCHAR);
|
||||||
NewName.Length -= 9 * sizeof(WCHAR);
|
NewName.Length -= PipePrefix.Length;
|
||||||
|
NewName.MaximumLength -= PipePrefix.Length;
|
||||||
|
|
||||||
/* Initialize the Dos Devices name */
|
/* Initialize the Dos Devices name */
|
||||||
TRACE("NewName: %wZ\n", &NewName);
|
TRACE("NewName: %wZ\n", &NewName);
|
||||||
|
@ -438,10 +439,10 @@ WaitNamedPipeW(LPCWSTR lpNamedPipeName,
|
||||||
} while (*p);
|
} while (*p);
|
||||||
|
|
||||||
/* Now make sure the full name contains "pipe\" */
|
/* Now make sure the full name contains "pipe\" */
|
||||||
if ((*p) && !(_wcsnicmp(p + 1, L"pipe\\", sizeof("pipe\\"))))
|
if ((*p) && !(_wcsnicmp(p + 1, L"pipe\\", sizeof("pipe\\") - sizeof(ANSI_NULL))))
|
||||||
{
|
{
|
||||||
/* Get to the pipe name itself now */
|
/* Get to the pipe name itself now */
|
||||||
p += sizeof("pipe\\") - 1;
|
p += sizeof("pipe\\") - sizeof(ANSI_NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue