gallium: fix memory corruption in u_gen_mipmap.c
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 18 Dec 2008 01:52:10 +0000 (18:52 -0700)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 18 Dec 2008 01:52:10 +0000 (18:52 -0700)
commitd1c8af7c0a18340fdde45ade6f612939a3c8e62a
tree71b75df9895ee6f4ca28196a637613e43616bcef
parentf0b0794b3885a2fdfb168ec4521c7b5e942d3228
gallium: fix memory corruption in u_gen_mipmap.c

Remove the old/initial vbuf allocation in util_create_gen_mipmap().
We were allocating a small vbuf at this point so get_next_slot() didn't have
as large of buffer as it expected.  So all but the first set_vertex_data()
was writing out of bounds.

Also added some comments.
src/gallium/auxiliary/util/u_gen_mipmap.c