aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-05-10 10:36:58 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-10 15:12:15 +0000
commit2d46a009266150dcdf1c9dda32c0ba0c79248979 (patch)
tree6c72dac7007f70f33beb603657325f93e4f3e0c1 /experimental
parentc2ea327d14801b4001716619c7d002caa37a1574 (diff)
allow divide by zero
Bug: oss-fuzz:8214 Change-Id: Ieb2e61b23f88e399df3bfb284742d4604b7d27fa Reviewed-on: https://skia-review.googlesource.com/127322 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'experimental')
-rw-r--r--experimental/skottie/Skottie.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/experimental/skottie/Skottie.cpp b/experimental/skottie/Skottie.cpp
index 381c9be422..03429e7228 100644
--- a/experimental/skottie/Skottie.cpp
+++ b/experimental/skottie/Skottie.cpp
@@ -770,7 +770,7 @@ sk_sp<sksg::RenderNode> AttachCompLayer(const json::ValueRef& jlayer, AttachCont
stretch_time = jlayer["sr"].toDefault(1.0f);
*time_bias = -start_time;
- *time_scale = 1 / stretch_time;
+ *time_scale = sk_ieee_float_divide(1, stretch_time);
if (SkScalarIsNaN(*time_scale)) {
*time_scale = 1;
}