From 2d46a009266150dcdf1c9dda32c0ba0c79248979 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Thu, 10 May 2018 10:36:58 -0400 Subject: allow divide by zero Bug: oss-fuzz:8214 Change-Id: Ieb2e61b23f88e399df3bfb284742d4604b7d27fa Reviewed-on: https://skia-review.googlesource.com/127322 Reviewed-by: Florin Malita Commit-Queue: Mike Reed --- experimental/skottie/Skottie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'experimental') 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 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; } -- cgit v1.2.3