hud: don't overrun malloced arrays
hud: don't overrun malloced arrays

==17630== Invalid read of size 4
==17630==    at 0x400AE10: memcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==17630==    by 0x49024A2: u_upload_data (u_upload_mgr.c:253)
==17630==    by 0x49050E1: u_vbuf_draw_vbo (u_vbuf.c:980)
==17630==    by 0x487DE29: cso_draw_vbo (cso_context.c:1425)
==17630==    by 0x487DEA0: cso_draw_arrays (cso_context.c:1445)
==17630==    by 0x48A3B0E: hud_draw_colored_prims.constprop.6 (hud_context.c:123)
==17630==    by 0x48A4810: hud_draw (hud_context.c:266)
==17630==    by 0x48763F7: dri_flush (dri_drawable.c:483)
==17630==    by 0x4057510: dri2Flush.constprop.4 (dri2_glx.c:559)
==17630==    by 0x405789E: dri2SwapBuffers (dri2_glx.c:851)
==17630==    by 0x402C531: glXSwapBuffers (glxcmds.c:842)
==17630==    by 0x8049716: ??? (in /usr/bin/glxgears)
==17630==  Address 0x4426b2c is 4 bytes after a block of size 1,008 alloc'd
==17630==    at 0x4006B11: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==17630==    by 0x48A4CE7: hud_pane_add_graph (hud_context.c:625)
==17630==    by 0x48A68F0: hud_pipe_query_install (hud_driver_query.c:175)
==17630==    by 0x48A6A30: hud_driver_query_install (hud_driver_query.c:207)
==17630==    by 0x48A5835: hud_create (hud_context.c:791)
==17630==    by 0x48756CB: dri_create_context (dri_context.c:165)
==17630==    by 0x4871CD4: driCreateContextAttribs (dri_util.c:435)
==17630==    by 0x4871E06: driCreateNewContext (dri_util.c:464)
==17630==    by 0x4056A22: dri2_create_context (dri2_glx.c:223)
==17630==    by 0x402CF68: CreateContext (glxcmds.c:299)
==17630==    by 0x402D265: glXCreateContext (glxcmds.c:430)
==17630==    by 0x804B136: ??? (in /usr/bin/glxgears)

This is due to second vertex element being specified, and the upload
tries to fetch over the end. However the pane rendering only requires
a single vertex element, so specify only one.

Reviewed-by: Marek Olšák <8c7344a1abdb103e79ecfd488098373070c3c70e@amd.com>
Signed-off-by: Dave Airlie <f2295d84e358395675bc8031be58672073ae065e@redhat.com>

jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,djreep81/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,metora/MesaGLSLCompiler,benaadams/glsl-optimizer,djreep81/glsl-optimizer,zz85/glsl-optimizer,zeux/glsl-optimizer,bkaradzic/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,zeux/glsl-optimizer,zz85/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,metora/MesaGLSLCompiler,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,tokyovigilante/glsl-optimizer,bkaradzic/glsl-optimizer,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,mcanthony/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,zeux/glsl-optimizer,metora/MesaGLSLCompiler,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,wolf96/glsl-optimizer,zeux/glsl-optimizer,tokyovigilante/glsl-optimizer