Mesa (master): i915: Fix wrong sizeof argument in i915_update_tex_unit.

Vinson Lee vlee at kemper.freedesktop.org
Wed Nov 21 23:02:55 UTC 2012


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

Author: Vinson Lee <vlee at freedesktop.org>
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 <vlee at freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 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. */
 




More information about the mesa-commit mailing list