mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 20:50:29 +00:00
[WIN32K]
Change wcsncpy to safe functions (part 2/x) svn path=/trunk/; revision=51140
This commit is contained in:
parent
0b986764d4
commit
04d67b9ebd
1 changed files with 4 additions and 4 deletions
|
@ -309,11 +309,11 @@ UserEnumDisplayDevices(
|
|||
ZwClose(hkey);
|
||||
|
||||
/* Copy device name, device string and StateFlags */
|
||||
wcsncpy(pdispdev->DeviceName, pGraphicsDevice->szWinDeviceName, 32);
|
||||
wcsncpy(pdispdev->DeviceString, pGraphicsDevice->pwszDescription, 128);
|
||||
RtlStringCbCopyW(pdispdev->DeviceName, sizeof(pdispdev->DeviceName), pGraphicsDevice->szWinDeviceName);
|
||||
RtlStringCbCopyW(pdispdev->DeviceString, sizeof(pdispdev->DeviceString), pGraphicsDevice->pwszDescription);
|
||||
pdispdev->StateFlags = pGraphicsDevice->StateFlags;
|
||||
|
||||
// FIXME: fill in DEVICE ID
|
||||
pdispdev->DeviceID[0] = UNICODE_NULL;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ NtUserEnumDisplayDevices(
|
|||
if (pustrDevice && iDevNum != 0)
|
||||
return FALSE;
|
||||
|
||||
dispdev.cb = sizeof(DISPLAY_DEVICEW);
|
||||
dispdev.cb = sizeof(dispdev);
|
||||
|
||||
if (pustrDevice)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue