prevent buffer overflow, LoadString accepts the size of the buffer in TCHARs, not in bytes!

svn path=/trunk/; revision=14981
This commit is contained in:
Thomas Bluemel 2005-05-04 22:32:43 +00:00
parent c1b7289bd6
commit 0e71d1e88d

View file

@ -105,8 +105,8 @@ void StartShell(void)
} }
else else
{ {
LoadString( GetModuleHandle(NULL), STRING_USERINIT_FAIL, (LPTSTR) szMsg,sizeof(szMsg)); LoadString( GetModuleHandle(NULL), STRING_USERINIT_FAIL, szMsg, sizeof(szMsg) / sizeof(szMsg[0]));
MessageBox(0, szMsg, NULL, 0); MessageBox(0, szMsg, NULL, 0);
} }
} }