mirror of
https://github.com/reactos/reactos.git
synced 2024-08-02 09:30:55 +00:00
Fix buffer overflow on unicode builds introduced in r27982
svn path=/trunk/; revision=27983
This commit is contained in:
parent
5cd0ce3185
commit
e7faae18fc
|
@ -98,7 +98,7 @@ ParseMemSettings(PVIRTMEM pVirtMem)
|
||||||
INT DriveLen;
|
INT DriveLen;
|
||||||
INT PgCnt = 0;
|
INT PgCnt = 0;
|
||||||
|
|
||||||
ZeroMemory(&szDrives, sizeof(szDrives) * sizeof(TCHAR));
|
ZeroMemory(szDrives, sizeof(szDrives));
|
||||||
DriveLen = GetLogicalDriveStrings(1023,
|
DriveLen = GetLogicalDriveStrings(1023,
|
||||||
szDrives);
|
szDrives);
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ ParseMemSettings(PVIRTMEM pVirtMem)
|
||||||
DrivePtr = _tcsupr(DrivePtr);
|
DrivePtr = _tcsupr(DrivePtr);
|
||||||
|
|
||||||
/* copy the 'X:' portion */
|
/* copy the 'X:' portion */
|
||||||
lstrcpyn(szDrive, DrivePtr, 3);
|
lstrcpyn(szDrive, DrivePtr, sizeof(szDrive) / sizeof(TCHAR));
|
||||||
|
|
||||||
if(GetDriveType(DrivePtr) == DRIVE_FIXED)
|
if(GetDriveType(DrivePtr) == DRIVE_FIXED)
|
||||||
{
|
{
|
||||||
|
@ -247,8 +247,8 @@ WritePageFileSettings(PVIRTMEM pVirtMem)
|
||||||
static VOID
|
static VOID
|
||||||
SetListBoxColumns(HWND hwndListBox)
|
SetListBoxColumns(HWND hwndListBox)
|
||||||
{
|
{
|
||||||
INT tabs[2] = {30, 170};
|
const INT tabs[2] = {30, 170};
|
||||||
SendMessage(hwndListBox, LB_SETTABSTOPS, (WPARAM)2, (LPARAM)(LPINT) &tabs[0]);
|
SendMessage(hwndListBox, LB_SETTABSTOPS, (WPARAM)2, (LPARAM)&tabs[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue