https://bugs.winehq.org/show_bug.cgi?id=45590
Bug ID: 45590 Summary: Possible access to unintended variable in "wine/dlls/wined3d/texture.c" line 2819 Product: Wine Version: unspecified Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: petrum@gmail.com
While experimenting with a CodeSonar plugin we develop, we noticed a potential bug in file "wine/dlls/wined3d/texture.c" line 2819 function wined3d_texture_update_overlay. The version of the file is the one in the "stable" branch from github.
dst_surface = dst_sub_resource->u.surface; if (dst_rect) surface->overlay_destrect = *dst_rect; //HERE else SetRect(&surface->overlay_destrect, 0, 0, wined3d_texture_get_level_width(dst_texture, dst_surface->texture_level), wined3d_texture_get_level_height(dst_texture, dst_surface->texture_level));
Shouldn't dst_surface be accessed in that line instead of surface?
Thanks, Petru Florin Mihancea
https://bugs.winehq.org/show_bug.cgi?id=45590
--- Comment #1 from Henri Verbeet hverbeet@gmail.com --- (In reply to Petru-Florin Mihancea from comment #0)
Shouldn't dst_surface be accessed in that line instead of surface?
No, that's working as intended. The equivalent code in the development branch [1] is perhaps slightly less confusing, but ultimately it's simply a weird DirectDraw feature, and there's only so much we can do there.
[1] https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/wined3d/texture.c#l31...
https://bugs.winehq.org/show_bug.cgi?id=45590
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED CC| |dark.shadow4@web.de
--- Comment #2 from Fabian Maurer dark.shadow4@web.de --- Marking invalid as of Comment 1.
https://bugs.winehq.org/show_bug.cgi?id=45590
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED CC| |nerv@dawncrow.de
--- Comment #3 from André H. nerv@dawncrow.de --- closing invalid