Author: tfaber
Date: Wed Oct 23 11:39:00 2013
New Revision: 60736
URL:
http://svn.reactos.org/svn/reactos?rev=60736&view=rev
Log:
[MSPAINT][REGEDIT][WINLOGON]
- Fix some potential buffer overruns
Modified:
trunk/reactos/base/applications/mspaint/dialogs.c
trunk/reactos/base/applications/regedit/framewnd.c
trunk/reactos/base/system/winlogon/sas.c
Modified: trunk/reactos/base/applications/mspaint/dialogs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
==============================================================================
--- trunk/reactos/base/applications/mspaint/dialogs.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mspaint/dialogs.c [iso-8859-1] Wed Oct 23 11:39:00
2013
@@ -228,9 +228,9 @@
TCHAR strrcAngle[100];
BOOL tr1, tr2, tr3, tr4;
- LoadString(hProgInstance, IDS_INTNUMBERS, strrcIntNumbers,
sizeof(strrcIntNumbers));
- LoadString(hProgInstance, IDS_PERCENTAGE, strrcPercentage,
sizeof(strrcPercentage));
- LoadString(hProgInstance, IDS_ANGLE, strrcAngle,
sizeof(strrcAngle));
+ LoadString(hProgInstance, IDS_INTNUMBERS, strrcIntNumbers,
SIZEOF(strrcIntNumbers));
+ LoadString(hProgInstance, IDS_PERCENTAGE, strrcPercentage,
SIZEOF(strrcPercentage));
+ LoadString(hProgInstance, IDS_ANGLE, strrcAngle,
SIZEOF(strrcAngle));
stretchSkew.percentage.x = GetDlgItemInt(hwnd,
IDD_STRETCHSKEWEDITHSTRETCH, &tr1, FALSE);
stretchSkew.percentage.y = GetDlgItemInt(hwnd,
IDD_STRETCHSKEWEDITVSTRETCH, &tr2, FALSE);
Modified: trunk/reactos/base/applications/regedit/framewnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
==============================================================================
--- trunk/reactos/base/applications/regedit/framewnd.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/framewnd.c [iso-8859-1] Wed Oct 23 11:39:00
2013
@@ -249,9 +249,9 @@
c = 0;
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';
- 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';
@@ -360,7 +360,7 @@
/* build the "All Files" filter up */
filter.DisplayID = IDS_FLT_ALLFILES;
filter.FilterID = IDS_FLT_ALLFILES_FLT;
- BuildFilterStrings(Filter, &filter, sizeof(filter));
+ BuildFilterStrings(Filter, &filter, 1);
ofn.lpstrFilter = Filter;
/* load and set the caption and flags for dialog */
LoadStringW(hInst, IDS_LOAD_HIVE, Caption, COUNT_OF(Caption));
Modified: trunk/reactos/base/system/winlogon/sas.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/winlogon/sas.c…
==============================================================================
--- trunk/reactos/base/system/winlogon/sas.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/winlogon/sas.c [iso-8859-1] Wed Oct 23 11:39:00 2013
@@ -438,7 +438,7 @@
{
//WCHAR StatusMsg[256];
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);
goto cleanup;
}