mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 22:32:41 +00:00
prevent buffer overflow, LoadString accepts the size of the buffer in TCHARs, not in bytes!
svn path=/trunk/; revision=14980
This commit is contained in:
parent
410ddcfe72
commit
c1b7289bd6
1 changed files with 2 additions and 2 deletions
|
@ -280,8 +280,8 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho
|
|||
WCHAR PromptMsg[RC_STRING_MAX_SIZE];
|
||||
CHAR InputBuffer[255];
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_WelcomeMsg, (LPTSTR) WelcomeMsg,sizeof(WelcomeMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_PromptMsg, (LPTSTR) PromptMsg ,sizeof(PromptMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_WelcomeMsg, (LPTSTR) WelcomeMsg,sizeof(WelcomeMsg) / sizeof(WelcomeMsg[0]));
|
||||
LoadString( GetModuleHandle(NULL), STRING_PromptMsg, (LPTSTR) PromptMsg ,sizeof(PromptMsg) / sizeof(PromptMsg[0]));
|
||||
|
||||
AllocConsole();
|
||||
SetConsoleTitleW(L"ntvdm");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue