mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
properly zero terminate the buffer in GetComputerName
svn path=/trunk/; revision=36032
This commit is contained in:
parent
d2b37f54df
commit
90cdd4f331
1 changed files with 1 additions and 2 deletions
|
@ -94,9 +94,8 @@ static BOOL GetComputerNameFromRegistry( LPWSTR RegistryKey,
|
|||
}
|
||||
|
||||
if( *nSize > (KeyInfo->DataLength / sizeof(WCHAR)) ) {
|
||||
*nSize = KeyInfo->DataLength / sizeof(WCHAR);
|
||||
*nSize = KeyInfo->DataLength / sizeof(WCHAR) - 1;
|
||||
lpBuffer[*nSize] = 0;
|
||||
(*nSize)--;
|
||||
}
|
||||
|
||||
RtlCopyMemory (lpBuffer,
|
||||
|
|
Loading…
Reference in a new issue