From: Vinson Lee Date: Thu, 6 Jun 2013 06:01:00 +0000 (-0700) Subject: mesa: Prevent possible out-of-bounds read by save_SamplerParameteriv. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce1f85133d15098ae97a28bbcfa13c4995b772e2;p=mesa.git mesa: Prevent possible out-of-bounds read by save_SamplerParameteriv. Fixes "Out-of-bounds access" defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index abc86657cf0..8900c89ea2d 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -7024,7 +7024,10 @@ save_SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *params) static void GLAPIENTRY save_SamplerParameteri(GLuint sampler, GLenum pname, GLint param) { - save_SamplerParameteriv(sampler, pname, ¶m); + GLint parray[4]; + parray[0] = param; + parray[1] = parray[2] = parray[3] = 0; + save_SamplerParameteriv(sampler, pname, param); } static void GLAPIENTRY