[Spice-devel] [PATCH] server/video: do not allow non-streamable drawables be stream candidates

Alon Levy alevy at redhat.com
Sun May 20 00:46:03 PDT 2012


On Thu, May 17, 2012 at 08:46:47PM +0300, Yonit Halperin wrote:
> Fix a crash caused by a call to __red_is_next_stream_frame made by
> red_stream_maintenance, with a drawable that is not a DRAW_COPY one.
> Only DRAW_COPY drawables can be streamed, and __red_is_next_stream_frame
> refers to red_drawable->u.copy.src_bitmap.

ACK. Please spell out that the crash is a segfault on the field you
mention in the last sentence, thanks.

> ---
>  server/red_worker.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/server/red_worker.c b/server/red_worker.c
> index dd00bff..3a0bdf4 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -2916,6 +2916,10 @@ static inline int __red_is_next_stream_frame(RedWorker *worker,
>      RedDrawable *red_drawable;
>      int is_frame_container = FALSE;
>  
> +    if (!candidate->streamable) {
> +        return STREAM_FRAME_NONE;
> +    }
> +
>      if (candidate->creation_time - other_time >
>              (stream ? RED_STREAM_CONTINUS_MAX_DELTA : RED_STREAM_DETACTION_MAX_DELTA)) {
>          return STREAM_FRAME_NONE;
> -- 
> 1.7.7.6
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list