Skip to content

Fix crash vulnerabilities in path animation and layer parent handling#593

Open
mihashco wants to merge 1 commit into
Samsung:masterfrom
mihashco:fix-path-data-empty-frames
Open

Fix crash vulnerabilities in path animation and layer parent handling#593
mihashco wants to merge 1 commit into
Samsung:masterfrom
mihashco:fix-path-data-empty-frames

Conversation

@mihashco
Copy link
Copy Markdown
Contributor

@mihashco mihashco commented Jun 1, 2026

Two stability issues have been addressed:

  1. PathData specialization: Added missing empty-frames guard in the Property::value() method at lottiemodel.h. This prevents a null pointer dereference when animation keyframes are discarded during parsing, leaving the frames array empty.

  2. Layer parent recursion: Added depth limiting to Layer::matrix() at lottieitem.cpp to prevent stack overflow from cyclic parent layer references. The method now uses an internal overload with a depth counter that returns an identity matrix when exceeding 64 levels.

Files changed:

  • src/lottie/lottiemodel.h: Added empty check before accessing frames
  • src/lottie/lottieitem.h: Declared overloaded matrix() with depth param
  • src/lottie/lottieitem.cpp: Implemented depth-limited matrix traversal

Two stability issues have been addressed:

1. PathData specialization: Added missing empty-frames guard in the
   Property<PathData>::value() method at lottiemodel.h. This prevents
   a null pointer dereference when animation keyframes are discarded
   during parsing, leaving the frames array empty.

2. Layer parent recursion: Added depth limiting to Layer::matrix() at
   lottieitem.cpp to prevent stack overflow from cyclic parent layer
   references. The method now uses an internal overload with a depth
   counter that returns an identity matrix when exceeding 64 levels.

Files changed:
  - src/lottie/lottiemodel.h: Added empty check before accessing frames
  - src/lottie/lottieitem.h: Declared overloaded matrix() with depth param
  - src/lottie/lottieitem.cpp: Implemented depth-limited matrix traversal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants