commit | 28e80f4013d90a0da45d01533c16a612bfdb0a6c | [log] [tgz] |
---|---|---|
author | scroggo <scroggo@google.com> | Fri Dec 11 09:49:57 2015 -0800 |
committer | Commit bot <commit-bot@chromium.org> | Fri Dec 11 09:49:57 2015 -0800 |
tree | 05e28646e9852ffecacf8fc622bf54a38d1e89c8 | |
parent | 46646506f1c95739998136472727d06760b75cf6 [diff] [blame] |
Fix a crash in SkParsePath::FromSVGString BUG=skia:3491 Review URL: https://codereview.chromium.org/1515193002
diff --git a/src/utils/SkParsePath.cpp b/src/utils/SkParsePath.cpp index 3fecb46..3eb9e1e 100644 --- a/src/utils/SkParsePath.cpp +++ b/src/utils/SkParsePath.cpp
@@ -77,6 +77,10 @@ char previousOp = '\0'; bool relative = false; for (;;) { + if (!data) { + // Truncated data + return false; + } data = skip_ws(data); if (data[0] == '\0') { break;