http://bugs.winehq.org/show_bug.cgi?id=30691
Bug #: 30691 Summary: excessive operator '&' in GetThemeSysFont(); can probably lead to segfault Product: Wine Version: 1.5.4 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: uxtheme AssignedTo: wine-bugs@winehq.org ReportedBy: mity@morous.org Classification: Unclassified
In function GetThemeSysFont() in dlls/uxtheme/metric.c, there is this code (lines 120 - 123):
if(iFontID == TMT_ICONTITLEFONT) { if(!SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(LOGFONTW), &plf, 0)) return HRESULT_FROM_WIN32(GetLastError()); }
However the var. plf is already pointer to LOGFONT, so wrong address is passed into SystemParametersInfoW(). The '&' should be removed.
http://bugs.winehq.org/show_bug.cgi?id=30691
Daniel Jelinski djelinski1@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |djelinski1@gmail.com
--- Comment #1 from Daniel Jelinski djelinski1@gmail.com 2012-05-20 14:00:04 CDT --- good catch! Why don't you send a patch?
http://bugs.winehq.org/show_bug.cgi?id=30691
--- Comment #2 from Mity mity@morous.org 2012-05-21 13:06:19 CDT --- In short, because I'm lazy.
Because I am not interested to learn Wine rules of patch submitting because of such miserable bug. Because I am not Wine developer and I don't have a plan and time to be one, it was really just a random catch when searching for some code example. :-)
@anyone: Feel free to provide a patch yourself. I really can live without my name in Wine changelog.
http://bugs.winehq.org/show_bug.cgi?id=30691
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |d7ccfef25b5a128705dbfc11a71 | |7c2f4153f02c6 Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #3 from Austin English austinenglish@gmail.com 2012-05-22 15:54:41 CDT --- (In reply to comment #2)
In short, because I'm lazy.
Because I am not interested to learn Wine rules of patch submitting because of such miserable bug. Because I am not Wine developer and I don't have a plan and time to be one, it was really just a random catch when searching for some code example. :-)
@anyone: Feel free to provide a patch yourself. I really can live without my name in Wine changelog.
http://source.winehq.org/git/wine.git/commitdiff/d7ccfef25b5a128705dbfc11a71...
Thanks for reporting.
http://bugs.winehq.org/show_bug.cgi?id=30691
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2012-05-25 13:43:30 CDT --- Closing bugs fixed in 1.5.5.
http://bugs.winehq.org/show_bug.cgi?id=30691
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.4.x
http://bugs.winehq.org/show_bug.cgi?id=30691
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.4.x |---