File: Reject-reversed-frames.patch

package info (click to toggle)
rlottie 0.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,864 kB
  • sloc: cpp: 20,368; asm: 221; ansic: 194; makefile: 15
file content (19 lines) | stat: -rw-r--r-- 637 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Reject reversed frames
Origin: https://github.com/Samsung/rlottie/commit/327fb7dbaad225555d5ca567b9adee9ce5f879f4
Forwarded: https://github.com/Samsung/rlottie/pull/483
Author: Nicholas Guriev <guriev-ns@ya.ru>
Last-Update: Wed, 16 Feb 2022 23:14:47 +0300

--- a/src/lottie/lottieparser.cpp
+++ b/src/lottie/lottieparser.cpp
@@ -661,6 +661,10 @@ void LottieParserImpl::parseComposition(
         // don't have a valid bodymovin header
         return;
     }
+    if (comp->mStartFrame > comp->mEndFrame) {
+        // reversed animation? missing data?
+        return;
+    }
     if (!IsValid()) {
         return;
     }