mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-25 23:59:12 +00:00
assuming logic
This commit is contained in:
parent
08609129e8
commit
eff068f59b
1 changed files with 9 additions and 7 deletions
|
@ -356,6 +356,15 @@ struct LottieGenericProperty : LottieProperty
|
|||
|
||||
void copy(const LottieGenericProperty<Frame, Value, Scalar>& rhs, bool shallow = true)
|
||||
{
|
||||
// TODO: 슬롯 데이터 이전 로직에 expression에 대한 정보 추가 필요
|
||||
if (rhs.exp) {
|
||||
exp = rhs.exp;
|
||||
exp->property = this; // Slot JSON obj의 프로퍼티를 바라보면 안되므로, exp를 덮어씌울 때는 반드시 원본 obj의 property를 지정해주어야함. otherwise heap UAF
|
||||
const_cast<LottieGenericProperty<Frame, Value, Scalar>&>(rhs).exp = nullptr;
|
||||
return; // Exp가 있는 경우 해당 슬롯은 코드 데이터만 있는것으로 assume && spec 확인 필요
|
||||
// 동시에 overriding가능한 경우 슬롯에 다른 데이터가 없는지 검사 후 flag를 선언하여, 값을 덮어씌우지 않도록 해야함
|
||||
}
|
||||
|
||||
if (rhs.frames) {
|
||||
if (shallow) {
|
||||
frames = rhs.frames;
|
||||
|
@ -365,13 +374,6 @@ struct LottieGenericProperty : LottieProperty
|
|||
*frames = *rhs.frames;
|
||||
}
|
||||
} else value = rhs.value;
|
||||
|
||||
// TODO: 슬롯 데이터 이전 로직에 expression에 대한 정보 추가 필요
|
||||
if (rhs.exp) {
|
||||
exp = rhs.exp;
|
||||
exp->property = this; // Slot JSON obj의 프로퍼티를 바라보면 안되므로, exp를 덮어씌울 때는 반드시 원본 obj의 property를 지정해주어야함. otherwise heap UAF
|
||||
const_cast<LottieGenericProperty<Frame, Value, Scalar>&>(rhs).exp = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
float angle(float frameNo)
|
||||
|
|
Loading…
Add table
Reference in a new issue