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 02:05:14 +0000 (19:05 -0700)
commitb890fffbf4ad435ef533988d288e98b0bfe4d17b
tree19cb11fbb1b42c74a4551b3e48ae2fd1ad1f9f6d
parent947d04d08bead28c43f525ea4c1d99a039bed047
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