From 10f214e5b248e5dd5f323c689549cd66d2f6ad22 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 13 Nov 2012 23:20:42 -0800 Subject: 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 Reviewed-by: Ian Romanick --- src/mesa/drivers/dri/i915/i915_texstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c index 4bd5e72cf67..94a8e5522ec 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. */ -- cgit v1.2.3