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: