File: Ignore-unspecified-type.patch

package info (click to toggle)
rlottie 0.1%2Bdfsg-4.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,948 kB
  • sloc: cpp: 20,376; asm: 221; ansic: 194; makefile: 16
file content (19 lines) | stat: -rw-r--r-- 734 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Ignore animations with objects of unspecified type
Origin: https://github.com/Samsung/rlottie/commit/d1636c7b47481e69d4100f3bff2a7a3be7680286
Forwarded: https://github.com/Samsung/rlottie/pull/515
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
@@ -1140,6 +1140,10 @@ LOTData* LottieParserImpl::parseObjectTy
 {
     RAPIDJSON_ASSERT(PeekType() == kStringType);
     const char *type = GetString();
+    if (!type) {
+        vWarning << "No object type specified";
+        return nullptr;
+    }
     if (0 == strcmp(type, "gr")) {
         return parseGroupObject();
     } else if (0 == strcmp(type, "rc")) {