SkPath::arcTo() will cause uninitialized memory reads in the following cases:

- when the previous point in the path and (x1, y1) are coincident
- when (x1, y1) and (x2, y2) are coincident

These cause the setNormalize() calls to leave the "before" and "after" vectors
uninitialized, respectively, which are then used to compute cosh and sinh.

I chose to implement HTML5 canvas behaviour for these cases (as well as for the
case where all three points are collinear):  add a line to the first point, and
bail.  I think this is ok, since skia is mostly used for HTML5 browsers, and
this case is degenerate anyway.

Review URL:  http://codereview.appspot.com/2484041



git-svn-id: http://skia.googlecode.com/svn/trunk@603 2bbb7eff-a529-9590-31e7-b0007b416f81
1 file changed