We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dfce430 commit 8e4441eCopy full SHA for 8e4441e
GLTFSDK/Inc/GLTFSDK/GLTFResourceReader.h
@@ -389,9 +389,13 @@ namespace Microsoft
389
390
for (size_t i = 0; i < indices.size(); i++)
391
{
392
- for (size_t j = 0; j < typeCount; j++)
+ // Verify provided index is valid before storing value
393
+ if ((indices[i] * typeCount + (typeCount - 1)) < baseData.size())
394
- baseData[indices[i] * typeCount + j] = values[i * typeCount + j];
395
+ for (size_t j = 0; j < typeCount; j++)
396
+ {
397
+ baseData[indices[i] * typeCount + j] = values[i * typeCount + j];
398
+ }
399
}
400
401
0 commit comments