Avoid potential buffer over-read in shader, overrun in application.

This commit is contained in:
Shyotl
2014-01-28 16:28:03 -06:00
parent c4a82fe0d1
commit 58b7fe5fef
2 changed files with 4 additions and 2 deletions

View File

@@ -1570,7 +1570,9 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
LLMatrix4a mp[JOINT_COUNT];
LLMatrix4* mat = (LLMatrix4*) mp;
for (U32 j = 0; j < skin->mJointNames.size(); ++j)
U32 count = llmin((U32) skin->mJointNames.size(), (U32) JOINT_COUNT);
for (U32 j = 0; j < count; ++j)
{
LLJoint* joint = avatar->getJoint(skin->mJointNames[j]);
if (joint)