From 81215a030aaf2df41a12f20ea6cd74343ac1c805 Mon Sep 17 00:00:00 2001 From: Nicholas Guriev Date: Fri, 28 May 2021 15:34:42 +0300 Subject: [PATCH] Reject reversed frames Change-Id: I162cfaf0a68967f2e248a3c3af4a0fbb2ce30a54 Signed-off-by: jykeon --- src/lottie/lottieparser.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lottie/lottieparser.cpp b/src/lottie/lottieparser.cpp index 3cb3f76..ebaaf3e 100644 --- a/src/lottie/lottieparser.cpp +++ b/src/lottie/lottieparser.cpp @@ -688,6 +688,10 @@ void LottieParserImpl::parseComposition() // don't have a valid bodymovin header return; } + if (comp->mStartFrame > comp->mEndFrame) { + // reveresed animation? missing data? + return; + } if (!IsValid()) { return; } -- 2.34.1