[Mesa-dev] [PATCH] svga: Ensure vb_transfer in svga_swtnl_draw_vbo in initialized.

Brian Paul brianp at vmware.com
Tue Nov 6 07:10:28 PST 2012


On 11/05/2012 11:30 PM, Vinson Lee wrote:
> Fixes a uninitialized pointer read defect reported by Coverity.
>
> Signed-off-by: Vinson Lee<vlee at freedesktop.org>
> ---
>   src/gallium/drivers/svga/svga_swtnl_draw.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/svga/svga_swtnl_draw.c b/src/gallium/drivers/svga/svga_swtnl_draw.c
> index 4aeeb67..bb57f6f 100644
> --- a/src/gallium/drivers/svga/svga_swtnl_draw.c
> +++ b/src/gallium/drivers/svga/svga_swtnl_draw.c
> @@ -39,7 +39,7 @@ enum pipe_error
>   svga_swtnl_draw_vbo(struct svga_context *svga,
>                       const struct pipe_draw_info *info)
>   {
> -   struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS];
> +   struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = { 0 };
>      struct pipe_transfer *ib_transfer = NULL;
>      struct pipe_transfer *cb_transfer = NULL;
>      struct draw_context *draw = svga->swtnl.draw;

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list