[PATCH] wined3d: fixed a NULL deref in create_arb_blt_fragment_program (Coverity)

Marcus Meissner marcus at jet.franken.de
Sat May 8 17:10:28 CDT 2010


Hi,

We set tex_type, but not the respective fprogram in this fallback
routine. Now we do.

Ciao, Marcus
---
 dlls/wined3d/arb_program_shader.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index e79538a..6221980 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -3188,8 +3188,9 @@ static GLuint create_arb_blt_fragment_program(const struct wined3d_gl_info *gl_i
     fprogram = masked ? blt_fprograms_masked[tex_type] : blt_fprograms_full[tex_type];
     if (!fprogram)
     {
-        FIXME("tex_type %#x not supported\n", tex_type);
+        FIXME("tex_type %#x not supported, falling back to tex_2d\n", tex_type);
         tex_type = tex_2d;
+        fprogram = masked ? blt_fprograms_masked[tex_type] : blt_fprograms_full[tex_type];
     }
 
     GL_EXTCALL(glGenProgramsARB(1, &program_id));
-- 
1.5.6



More information about the wine-patches mailing list