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