Skip to content
  • Federico Mena Quintero's avatar
    bgo#621088: rsvg_cairo_clip_render_new(): Don't leave uninitialized fields in... · 589e2dcf
    Federico Mena Quintero authored
    bgo#621088: rsvg_cairo_clip_render_new(): Don't leave uninitialized fields in the parent RsvgCairoRender
    
    A text object used as a clip path caused librsvg to crash.  The reason
    is that when we create an RsvgCairoClipRender, we were leaving an
    all-zeros clip_render->super.bbox field.
    
    This caused two things:
    
    1. An all-zeros RsvgBbox is invalid; it should be "virgin" or actually
    have a valid affine.
    
    2. We were not preserving the bbox from the parent rendering context,
    so the clipped objects would not know their viewport size.  Now we
    copy the original cairo_render->bbox to our derived
    clip_render->super.bbox, and start afresh with an empty bb_stack
    inside the clip_render.
    589e2dcf