[Spice-devel] [spice-server PATCH] dcc-send: remove useless pipe_item assignment pipe_item

Frediano Ziglio fziglio at redhat.com
Wed Jul 3 20:40:49 UTC 2019



> In red_pipe_replace_rendered_drawables_with_images, the
> value of pipe_item is re-written on the next iteration.
> 
> Since a78a7d251042892182b158650291d19a85bbd6b1 pipe_item
> is no longer used to control the loop.
> 
> Found by Covscan.
> 
> Signed-off-by: Uri Lublin <uril at redhat.com>
> ---
>  server/dcc-send.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/server/dcc-send.c b/server/dcc-send.c
> index b14619a2b..565a79f33 100644
> --- a/server/dcc-send.c
> +++ b/server/dcc-send.c
> @@ -753,7 +753,6 @@ static void
> red_pipe_replace_rendered_drawables_with_images(DisplayChannelClient
>  
>          spice_assert(image);
>          red_channel_client_pipe_remove_and_release_pos(RED_CHANNEL_CLIENT(dcc),
>          l);
> -        pipe_item = &image->base;
>      }
>  }
>  

Nice spot covscan!

Better however to remove also the use-after-free introduced by a78a7d251042892182b158650291d19a85bbd6b1 !

Frediano


More information about the Spice-devel mailing list