Fix possible overflow in new.

issue_3353
Kim Kulling 2020-08-05 17:56:44 +02:00 committed by GitHub
parent e7ae576614
commit b94183376c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -64,6 +64,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "Common/PolyTools.h"
#include <memory>
#include <cstdint>
//#define AI_BUILD_TRIANGULATE_COLOR_FACE_WINDING
//#define AI_BUILD_TRIANGULATE_DEBUG_POLYS
@ -141,7 +142,7 @@ bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
}
// Find out how many output faces we'll get
unsigned int numOut = 0, max_out = 0;
uint32_t numOut = 0, max_out = 0;
bool get_normals = true;
for( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
aiFace& face = pMesh->mFaces[a];