[Mesa-dev] [PATCH] i915: Fix wrong sizeof argument in i915_update_tex_unit.
Vinson Lee
vlee at freedesktop.org
Tue Nov 20 21:51:38 PST 2012
The bug was found by Coverity.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
src/mesa/drivers/dri/i915/i915_texstate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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. */
--
1.8.0
More information about the mesa-dev
mailing list