diff options
author | Mike Reed <reed@google.com> | 2018-03-16 11:25:29 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-16 19:03:16 +0000 |
commit | 7ba427ef40301d199bcd5c0f9a9d41244c495bd6 (patch) | |
tree | 6dd6e1e165e13ef41df9cf90069146111093ec9f /src/core/SkDevice.cpp | |
parent | b5319d5e132b84963801c1299382ccc62f13baaa (diff) |
handle bad xform in drawTextRSXform
Bug: oss-fuzz:6955
Change-Id: Ide1f57459a611980a86afea577eb4c2425e49e63
Reviewed-on: https://skia-review.googlesource.com/114782
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkDevice.cpp')
-rw-r--r-- | src/core/SkDevice.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp index 210af808c9..96a7e8dbfe 100644 --- a/src/core/SkDevice.cpp +++ b/src/core/SkDevice.cpp @@ -511,8 +511,11 @@ void SkBaseDevice::drawTextRSXform(const void* text, size_t len, // with a localmatrixshader so that the shader draws as if there was no change to the ctm. if (shader) { SkMatrix inverse; - SkAssertResult(localM.invert(&inverse)); - localPaint.setShader(shader->makeWithLocalMatrix(inverse)); + if (localM.invert(&inverse)) { + localPaint.setShader(shader->makeWithLocalMatrix(inverse)); + } else { + localPaint.setShader(nullptr); // can't handle this xform + } } int subLen = proc((const char*)text); |