Module: Mesa
Branch: master
Commit: 10f214e5b248e5dd5f323c689549cd66d2f6ad22
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=10f214e5b248e5dd5f323c689549cd66d2f6ad22

Author: Vinson Lee <[email protected]>
Date:   Tue Nov 13 23:20:42 2012 -0800

i915: Fix wrong sizeof argument in i915_update_tex_unit.

The bug was found by Coverity.

NOTE: This is a candidate for the stable branches.

Signed-off-by: Vinson Lee <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>

---

 src/mesa/drivers/dri/i915/i915_texstate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c 
b/src/mesa/drivers/dri/i915/i915_texstate.c
index 4bd5e72..94a8e55 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -146,7 +146,7 @@ i915_update_tex_unit(struct intel_context *intel, GLuint 
unit, GLuint ss3)
    GLubyte border[4];
    GLfloat maxlod;
 
-   memset(state, 0, sizeof(state));
+   memset(state, 0, sizeof(*state));
 
    /*We need to refcount these. */
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to