st/xorg: fix crash triggered by rendercheck -t composite -f a8r8g8b8 -o Src, Saturate
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Mon, 16 May 2011 19:52:47 +0000 (21:52 +0200)
committerMarek Olšák <maraeo@gmail.com>
Mon, 20 Jun 2011 00:20:26 +0000 (02:20 +0200)
samplers[0] may remain uninititialized if src picture/pixmap is null

src/gallium/state_trackers/xorg/xorg_composite.c

index b5dacd20bb5d0397dadd065742556490adeb8daf..f696b72e1e31b9f6c12e4dd7fef013c6ad928204 100644 (file)
@@ -355,7 +355,7 @@ bind_samplers(struct exa_context *exa, int op,
               struct exa_pixmap_priv *pMask,
               struct exa_pixmap_priv *pDst)
 {
-   struct pipe_sampler_state *samplers[PIPE_MAX_SAMPLERS];
+   struct pipe_sampler_state *samplers[PIPE_MAX_SAMPLERS] = {0};
    struct pipe_sampler_state src_sampler, mask_sampler;
    struct pipe_sampler_view view_templ;
    struct pipe_sampler_view *src_view;