From ba35c97e9d9fcfdca40f7fc43cf185e0556e95bb Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 28 Nov 2015 10:06:26 +0100 Subject: [PATCH] assimp/assimp/issues/698: Increase upper limits for hints. --- code/Importer.cpp | 2 +- include/assimp/Importer.hpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/Importer.cpp b/code/Importer.cpp index c30ffc2cf..aa0b51a93 100644 --- a/code/Importer.cpp +++ b/code/Importer.cpp @@ -491,7 +491,7 @@ const aiScene* Importer::ReadFileFromMemory( const void* pBuffer, pHint = ""; } - if (!pBuffer || !pLength || strlen(pHint) > 100) { + if (!pBuffer || !pLength || strlen(pHint) > MaxLenHint ) { pimpl->mErrorString = "Invalid parameters passed to ReadFileFromMemory()"; return NULL; } diff --git a/include/assimp/Importer.hpp b/include/assimp/Importer.hpp index 917c980d0..73c95f0e1 100644 --- a/include/assimp/Importer.hpp +++ b/include/assimp/Importer.hpp @@ -114,6 +114,9 @@ namespace Assimp { * threads for loading, each thread should maintain its own Importer instance. */ class ASSIMP_API Importer { +public: + /// @brief The upper limit for hints. + static const unsigned int MaxLenHint = 200; public: