Ver código fonte

mesa: Prevent possible out-of-bounds read by save_SamplerParameterfv.

Fixes "Out-of-bounds access" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
tags/mesa-9.2-rc1
Vinson Lee 12 anos atrás
pai
commit
7bafd88c15
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4
    1
      src/mesa/main/dlist.c

+ 4
- 1
src/mesa/main/dlist.c Ver arquivo

@@ -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, &param);
GLfloat parray[4];
parray[0] = param;
parray[1] = parray[2] = parray[3] = 0.0F;
save_SamplerParameterfv(sampler, pname, parray);
}

static void GLAPIENTRY

Carregando…
Cancelar
Salvar