Paul Gofman : wined3d: Validate pitch against the new format in wined3d_texture_update_desc().

Alexandre Julliard julliard at winehq.org
Mon Nov 1 16:38:03 CDT 2021


Module: wine
Branch: master
Commit: 7ba8943e72a834e94be03b48ad4e6621e9e3a18d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7ba8943e72a834e94be03b48ad4e6621e9e3a18d

Author: Paul Gofman <pgofman at codeweavers.com>
Date:   Mon Oct 25 15:15:56 2021 +0300

wined3d: Validate pitch against the new format in wined3d_texture_update_desc().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51907
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/texture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index f031daef373..df42f2d766b 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1887,7 +1887,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, unsig
      * requires a 4-byte aligned pitch and doesn't support texture formats
      * larger than 4 bytes per pixel nor any format using 3 bytes per pixel.
      * This check is here to verify that the assumption holds. */
-    if (pitch % texture->resource.format->byte_count)
+    if (pitch % format->byte_count)
     {
         WARN("Pitch unsupported, not a multiple of the texture format byte width.\n");
         return WINED3DERR_INVALIDCALL;




More information about the wine-cvs mailing list