[Spice-devel] [PATCH 06/10] server/red_worker: red_draw_qxl_drawable: protect from NULL dereference in case of buggy driver (or recording)

Fabiano FidĂȘncio fidencio at redhat.com
Tue Nov 3 02:34:50 PST 2015


On Tue, Nov 3, 2015 at 11:05 AM, Frediano Ziglio <fziglio at redhat.com> wrote:
>>
>> On Mon, Nov 2, 2015 at 10:56 AM, Frediano Ziglio <fziglio at redhat.com> wrote:
>> > From: Alon Levy <alon at pobox.com>
>> >
>> > ---
>> >  server/red_worker.c | 5 +++++
>> >  1 file changed, 5 insertions(+)
>> >
>> > diff --git a/server/red_worker.c b/server/red_worker.c
>> > index 339b353..868de94 100644
>> > --- a/server/red_worker.c
>> > +++ b/server/red_worker.c
>> > @@ -3838,6 +3838,11 @@ static void red_draw_qxl_drawable(RedWorker *worker,
>> > Drawable *drawable)
>> >
>> >      image_cache_aging(&worker->image_cache);
>> >
>> > +    if (!canvas) {
>> > +        spice_warning("ignoring drawable to destroyed surface %d\n",
>> > drawable->surface_id);
>> > +        return;
>> > +    }
>> > +
>> >      region_add(&surface->draw_dirty_region,
>> >      &drawable->red_drawable->bbox);
>> >
>> >      switch (drawable->red_drawable->type) {
>> > --
>> > 2.4.3
>> >
>> > _______________________________________________
>> > Spice-devel mailing list
>> > Spice-devel at lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
>>
>> ACK from me, but I am not sure if we had an agreement about these one last
>> week.
>> AFAIR you said it is a situation that never could happen and that we
>> could drop this patch.
>>
>
> I think you suggested to wait Alon reply or remove the patch if no reply.

Either dropping (with a certainty that it's not going to happen with
buggy drivers ...) or having the patch in is okay for me.


More information about the Spice-devel mailing list