diff options
author | Vinson Lee <[email protected]> | 2013-06-02 23:16:42 -0700 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2013-06-03 23:01:46 -0700 |
commit | 7bafd88c153e395274b632e7eae4bc9fc3aec1d2 (patch) | |
tree | a5001fd392d7fa37036fba3522794d824399b87c /src | |
parent | 0677ea063cd96adefe87c1fb01ef7c66d905535b (diff) |
mesa: Prevent possible out-of-bounds read by save_SamplerParameterfv.
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.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index c37b15ee64b..18e3eb76037 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -7056,7 +7056,10 @@ save_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *params) static void GLAPIENTRY save_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) { - save_SamplerParameterfv(sampler, pname, ¶m); + GLfloat parray[4]; + parray[0] = param; + parray[1] = parray[2] = parray[3] = 0.0F; + save_SamplerParameterfv(sampler, pname, parray); } static void GLAPIENTRY |