Bug 19240 - WinLauncher _tWinMain() returns uninitialized memory.
Summary: WinLauncher _tWinMain() returns uninitialized memory.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P4 Minor
Assignee: Brent Fulgham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-24 23:27 PDT by Paul Pedriana
Modified: 2011-06-02 12:11 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Pedriana 2008-05-24 23:27:38 PDT
WinLauncher _tWinMain() returns uninitialized memory for the msg.wParam variable in some cases. The problem is that the msg variable is uninitialized. The following shows the relevant code:

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
    .
    .
    MSG msg;
    .
    .
    HRESULT hr = CoCreateInstance(CLSID_WebView, 0, CLSCTX_ALL, IID_IWebView, (void**)&gWebView);
    if (FAILED(hr))
        goto exit;
    .
    .
exit:
    .
    .
    return (int) msg.wParam;
}
Comment 1 Brent Fulgham 2011-06-02 10:05:32 PDT
This has been fixed for some time.  The MSG struct is now zero-initialized:

MSG msg = {0};

I'll confirm in the debugger and close the issue.
Comment 2 Brent Fulgham 2011-06-02 12:11:00 PDT
I just confirmed that the MSG structure is cleanly initialized, and that the program terminates with the expected success return code during normal operation.

Closing as resolved.