mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
properly zero terminate the buffer in GetComputerName
svn path=/trunk/; revision=36032
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user