From 87369070092b9b679f7548b911f1cd32aa3b9861 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 2 Dec 2015 19:58:43 +0100 Subject: [PATCH] Importer: fix overflowImporter: fix overflow. --- code/Importer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/Importer.cpp b/code/Importer.cpp index aa0b51a93..14b5c096c 100644 --- a/code/Importer.cpp +++ b/code/Importer.cpp @@ -503,7 +503,8 @@ const aiScene* Importer::ReadFileFromMemory( const void* pBuffer, SetIOHandler(new MemoryIOSystem((const uint8_t*)pBuffer,pLength)); // read the file and recover the previous IOSystem - char fbuff[128]; + static const size_t BufferSize(Importer::MaxLenHint + 28); + char fbuff[ BufferSize ]; sprintf(fbuff,"%s.%s",AI_MEMORYIO_MAGIC_FILENAME,pHint); ReadFile(fbuff,pFlags);