diff --git a/code/Importer.cpp b/code/Importer.cpp index c30ffc2cf925420df58714c5128a4614732200f6..aa0b51a939ab6a16b7473c0dabdcab232633c0eb 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 917c980d01dcc7ef599d9941fc83402b9c4cc461..73c95f0e1e2efc22a0ecf5542bae428ae41a27aa 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: