When sending attached xps testfile, the xps (defining a path, but no path data: empty path) then during the xps_update_bounds() the seg = (segment*)ctx->pgs->path->first_subpath; === 0 thus rc.p.x = rc.q.x = fixed2float(seg->pt.x); sigsegv!! solution if ((seg = (segment*)ctx->pgs->path->first_subpath)) == 0) return;
Created attachment 5206 [details] m6.6b.xps microsoft handcrafted testfile: m6.6b.xps (defining a null-path).
Shorting out with an early return isn't the correct thing to do, since filling or clipping with an empty path means nothing will be visible. I've added a test for empty paths to update the bounds to an empty rectangle instead. Committed in rev 9896. --- xps/xpspath.c (revision 9895) +++ xps/xpspath.c (working copy) @@ -69,8 +69,16 @@ /* the coordinates of the path segments are already in device space (yay!) */ seg = (segment*)ctx->pgs->path->first_subpath; - rc.p.x = rc.q.x = fixed2float(seg->pt.x); - rc.p.y = rc.q.y = fixed2float(seg->pt.y); + if (seg) + { + rc.p.x = rc.q.x = fixed2float(seg->pt.x); + rc.p.y = rc.q.y = fixed2float(seg->pt.y); + } + else + { + rc.p.x = rc.q.x = 0.0; + rc.p.y = rc.q.y = 0.0; + }
Changing customer bugs that have been resolved more than a year ago to closed.