From c6f670ff50a5099e7f12daf91c96b46a04498f81 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 29 Aug 2016 20:05:29 +0200 Subject: [PATCH] glTFImporter: avoid out-of-bounds-access. --- code/glTFImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/glTFImporter.cpp b/code/glTFImporter.cpp index 6a6619b81..a1781b04c 100644 --- a/code/glTFImporter.cpp +++ b/code/glTFImporter.cpp @@ -303,7 +303,7 @@ void glTFImporter::ImportMeshes(glTF::Asset& r) attr.normal[0]->ExtractData(aim->mNormals); } - for (size_t tc = 0; tc < attr.texcoord.size() && tc <= AI_MAX_NUMBER_OF_TEXTURECOORDS; ++tc) { + for (size_t tc = 0; tc < attr.texcoord.size() && tc < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++tc) { attr.texcoord[tc]->ExtractData(aim->mTextureCoords[tc]); aim->mNumUVComponents[tc] = attr.texcoord[tc]->GetNumComponents();