Closed
Bug 906350
Opened 11 years ago
Closed 11 years ago
WinUtils Initialize() checks the return result of LoadLibrary using the wrong value
Categories
(Core :: Widget: Win32, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: jimm, Assigned: avih)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
1.70 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
http://mxr.mozilla.org/mozilla-central/source/widget/windows/WinUtils.cpp#76 Should be if (uintptr_t(sDwmDll)) {
Comment 1•11 years ago
|
||
Is the cast even needed? I'm pretty sure HMODULE is just a void pointer under the hood.
Comment 2•11 years ago
|
||
> // MSDN: "If the function succeeds, the return value is greater than 31." Where in MSDN? I was unable to find the statement at least here: http://msdn.microsoft.com/library/ms684175.aspx
Comment 3•11 years ago
|
||
Was probably confusion with ShellExecute http://msdn.microsoft.com/en-us/library/windows/desktop/bb762153%28v=vs.85%29.aspx
Assignee | ||
Comment 4•11 years ago
|
||
Assignee: nobody → avihpit
Attachment #795188 -
Flags: review?(roc)
Assignee | ||
Comment 5•11 years ago
|
||
It seems that all around the code we either check LoadLibraryW for non-null, or just go ahead with GetProcAddress without checking, and count on it to return null if the HMODULE is invalid.
Attachment #795188 -
Attachment is obsolete: true
Attachment #795188 -
Flags: review?(roc)
Attachment #795190 -
Flags: review?(roc)
Comment on attachment 795190 [details] [diff] [review] Forgot to removed the comment about >31 Review of attachment 795190 [details] [diff] [review]: ----------------------------------------------------------------- I think I was looking at http://msdn.microsoft.com/en-us/library/windows/desktop/ms684183%28v=vs.85%29.aspx
Attachment #795190 -
Flags: review?(roc) → review+
Assignee | ||
Comment 7•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a6fa04f0c9e
Comment 8•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1a6fa04f0c9e
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•