[Spice-devel] [PATCH spice-gtk] channel: switch to protocol 1 on error during link-time

Marc-André Lureau mlureau at redhat.com
Mon Dec 17 03:31:52 PST 2012


Hi

----- Mensaje original -----
> >      c->peer_msg = spice_malloc(c->peer_hdr.size);
> >      if (c->peer_msg == NULL) {
> > -        g_critical("invalid peer header size: %u",
> > c->peer_hdr.size);
> > +        g_warning("invalid peer header size: %u",
> > c->peer_hdr.size);
> >          goto error;
> >      }
> 
> This whole check is not needed as spice_malloc will abort on
> allocation failures anyway.
> Looks good otherwise,
> 

See 06caae141c9bf30cd5271daf6af9ea0280ba1d5b for rationale:

    do not segfault if link message header size is set to 0
    
    https://bugs.freedesktop.org/show_bug.cgi?id=41988


More information about the Spice-devel mailing list