On Mon, Jun 3, 2013 at 12:24 AM, Vinson Lee <span dir="ltr"><<a href="mailto:vlee@freedesktop.org" target="_blank">vlee@freedesktop.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Fixes "Out-of-bounds access" defect reported by Coverity.<br>
<br>
Signed-off-by: Vinson Lee <<a href="mailto:vlee@freedesktop.org">vlee@freedesktop.org</a>><br>
---<br>
src/mesa/main/dlist.c | 5 ++++-<br>
1 file changed, 4 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c<br>
index c37b15e..6c26313 100644<br>
--- a/src/mesa/main/dlist.c<br>
+++ b/src/mesa/main/dlist.c<br>
@@ -7056,7 +7056,10 @@ save_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *params)<br>
static void GLAPIENTRY<br>
save_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)<br>
{<br>
- save_SamplerParameterfv(sampler, pname, ¶m);<br>
+ GLfloat parray[4];<br>
+ parray[0] = param;<br>
+ parray[1] = parray[2] = parray[3] = 0.0F;<br>
+ save_SamplerParameterfv(sampler, pname, parray);<br>
}<br>
<br>
static void GLAPIENTRY<br>
<span class="HOEnZb"><font color="#888888"><br><br></font></span></blockquote><div>Reviewed-by: Brian Paul <<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>><br> <br></div></div><br>