protect against fuzzer

Fuzzer data may generate path without a computable
length.

R=reed@google.com
Bug: 739190
Change-Id: I052540932937f24951ce66699080b8b959fb1a46
Reviewed-on: https://skia-review.googlesource.com/21500
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp
index 626deeb..34b1648 100644
--- a/src/core/SkPathMeasure.cpp
+++ b/src/core/SkPathMeasure.cpp
@@ -513,6 +513,9 @@
     if (fLength < 0) {
         this->buildSegments();
     }
+    if (SkScalarIsNaN(fLength)) {
+        fLength = 0;
+    }
     SkASSERT(fLength >= 0);
     return fLength;
 }