Use fuzzier definition of zero-length segments in compute_intersection.

When working with segments in compute_intersection, we're often dividing
by the length squared. If that's 0, we'll end up dividing by 0. This
effectively puts a lower bound on the size of segment we can determine
intersections with other than treating it like a single point. We
arbitrarily choose the first endpoint as this point.

Bug: oss-fuzz:20009
Change-Id: I7581922f704ff8cef77456a80159cdb8ba3b716f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282160
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
1 file changed