Skip to content

Commit 9d17ff8

Browse files
mymedia2smohantty
authored andcommitted
Skip dash array of size one or zero
An attempt to fix CVE-2021-31317, not tested yet.
1 parent f379dfe commit 9d17ff8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/lottie/lottiemodel.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void model::Dash::getDashInfo(int frameNo, std::vector<float> &result) const
205205
{
206206
result.clear();
207207

208-
if (mData.empty()) return;
208+
if (mData.size() <= 1) return;
209209

210210
if (result.capacity() < mData.size()) result.reserve(mData.size() + 1);
211211

0 commit comments

Comments
 (0)