Merge pull request #651 from Ragora/bugfix-asan-tsshapeedit

BugFix: Correct an ASAN use-after-free Error in TSShapeEdit
This commit is contained in:
Brian Roberts 2021-11-03 22:19:50 -05:00 committed by GitHub
commit 4d56b34bbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1584,7 +1584,8 @@ bool TSShape::addSequence(const Torque::Path& path, const String& fromSeq,
offset = srcShape->groundTranslations.size() - 1; offset = srcShape->groundTranslations.size() - 1;
} }
groundTranslations.push_back(srcShape->groundTranslations[offset]); const Point3F pointValueToCopy = srcShape->groundTranslations[offset];
groundTranslations.push_back(pointValueToCopy);
S32 offset2 = groundBase + i; S32 offset2 = groundBase + i;
if (offset2 >= srcShape->groundRotations.size()) if (offset2 >= srcShape->groundRotations.size())
@ -1593,7 +1594,8 @@ bool TSShape::addSequence(const Torque::Path& path, const String& fromSeq,
offset2 = srcShape->groundRotations.size() - 1; offset2 = srcShape->groundRotations.size() - 1;
} }
groundRotations.push_back(srcShape->groundRotations[offset2]); const Quat16 quatValueToCopy = srcShape->groundRotations[offset2];
groundRotations.push_back(quatValueToCopy);
} }
// Add triggers // Add triggers