mirror of
https://github.com/reactos/reactos.git
synced 2025-04-29 10:39:07 +00:00
[MSPAINT][REGEDIT][WINLOGON]
- Fix some potential buffer overruns svn path=/trunk/; revision=60736
This commit is contained in:
parent
dd2d4349e2
commit
fe7ef7d573
3 changed files with 7 additions and 7 deletions
|
@ -228,9 +228,9 @@ CHSIZEDlgWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
TCHAR strrcAngle[100];
|
TCHAR strrcAngle[100];
|
||||||
BOOL tr1, tr2, tr3, tr4;
|
BOOL tr1, tr2, tr3, tr4;
|
||||||
|
|
||||||
LoadString(hProgInstance, IDS_INTNUMBERS, strrcIntNumbers, sizeof(strrcIntNumbers));
|
LoadString(hProgInstance, IDS_INTNUMBERS, strrcIntNumbers, SIZEOF(strrcIntNumbers));
|
||||||
LoadString(hProgInstance, IDS_PERCENTAGE, strrcPercentage, sizeof(strrcPercentage));
|
LoadString(hProgInstance, IDS_PERCENTAGE, strrcPercentage, SIZEOF(strrcPercentage));
|
||||||
LoadString(hProgInstance, IDS_ANGLE, strrcAngle, sizeof(strrcAngle));
|
LoadString(hProgInstance, IDS_ANGLE, strrcAngle, SIZEOF(strrcAngle));
|
||||||
|
|
||||||
stretchSkew.percentage.x = GetDlgItemInt(hwnd, IDD_STRETCHSKEWEDITHSTRETCH, &tr1, FALSE);
|
stretchSkew.percentage.x = GetDlgItemInt(hwnd, IDD_STRETCHSKEWEDITHSTRETCH, &tr1, FALSE);
|
||||||
stretchSkew.percentage.y = GetDlgItemInt(hwnd, IDD_STRETCHSKEWEDITVSTRETCH, &tr2, FALSE);
|
stretchSkew.percentage.y = GetDlgItemInt(hwnd, IDD_STRETCHSKEWEDITVSTRETCH, &tr2, FALSE);
|
||||||
|
|
|
@ -249,9 +249,9 @@ BuildFilterStrings(WCHAR *Filter, PFILTERPAIR Pairs, int PairCount)
|
||||||
c = 0;
|
c = 0;
|
||||||
for(i = 0; i < PairCount; i++)
|
for(i = 0; i < PairCount; i++)
|
||||||
{
|
{
|
||||||
c += LoadStringW(hInst, Pairs[i].DisplayID, &Filter[c], 255 * sizeof(WCHAR));
|
c += LoadStringW(hInst, Pairs[i].DisplayID, &Filter[c], 255);
|
||||||
Filter[++c] = L'\0';
|
Filter[++c] = L'\0';
|
||||||
c += LoadStringW(hInst, Pairs[i].FilterID, &Filter[c], 255 * sizeof(WCHAR));
|
c += LoadStringW(hInst, Pairs[i].FilterID, &Filter[c], 255);
|
||||||
Filter[++c] = L'\0';
|
Filter[++c] = L'\0';
|
||||||
}
|
}
|
||||||
Filter[++c] = L'\0';
|
Filter[++c] = L'\0';
|
||||||
|
@ -360,7 +360,7 @@ static BOOL LoadHive(HWND hWnd)
|
||||||
/* build the "All Files" filter up */
|
/* build the "All Files" filter up */
|
||||||
filter.DisplayID = IDS_FLT_ALLFILES;
|
filter.DisplayID = IDS_FLT_ALLFILES;
|
||||||
filter.FilterID = IDS_FLT_ALLFILES_FLT;
|
filter.FilterID = IDS_FLT_ALLFILES_FLT;
|
||||||
BuildFilterStrings(Filter, &filter, sizeof(filter));
|
BuildFilterStrings(Filter, &filter, 1);
|
||||||
ofn.lpstrFilter = Filter;
|
ofn.lpstrFilter = Filter;
|
||||||
/* load and set the caption and flags for dialog */
|
/* load and set the caption and flags for dialog */
|
||||||
LoadStringW(hInst, IDS_LOAD_HIVE, Caption, COUNT_OF(Caption));
|
LoadStringW(hInst, IDS_LOAD_HIVE, Caption, COUNT_OF(Caption));
|
||||||
|
|
|
@ -438,7 +438,7 @@ HandleLogon(
|
||||||
{
|
{
|
||||||
//WCHAR StatusMsg[256];
|
//WCHAR StatusMsg[256];
|
||||||
WARN("WL: WlxActivateUserShell() failed\n");
|
WARN("WL: WlxActivateUserShell() failed\n");
|
||||||
//LoadStringW(hAppInstance, IDS_FAILEDACTIVATEUSERSHELL, StatusMsg, sizeof(StatusMsg));
|
//LoadStringW(hAppInstance, IDS_FAILEDACTIVATEUSERSHELL, StatusMsg, sizeof(StatusMsg) / sizeof(StatusMsg[0]));
|
||||||
//MessageBoxW(0, StatusMsg, NULL, MB_ICONERROR);
|
//MessageBoxW(0, StatusMsg, NULL, MB_ICONERROR);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue