summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2013-06-05 23:01:00 -0700
committerVinson Lee <[email protected]>2013-06-08 13:32:53 -0700
commitce1f85133d15098ae97a28bbcfa13c4995b772e2 (patch)
tree8f0ab3c3089a488ab0db75bc2bdc5e3a7c2a016f /src
parent26e047dec8dce96b7895feb8b77391c4a58a3895 (diff)
mesa: Prevent possible out-of-bounds read by save_SamplerParameteriv.
Fixes "Out-of-bounds access" defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/dlist.c5
1 files changed, 4 insertions, 1 deletions
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, &param);
+ GLint parray[4];
+ parray[0] = param;
+ parray[1] = parray[2] = parray[3] = 0;
+ save_SamplerParameteriv(sampler, pname, param);
}
static void GLAPIENTRY