From d185cea81c669cc0a2330c97a54a669892867599 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Tue, 11 Aug 2015 15:44:51 +0300 Subject: [PATCH] AC3D: Fix read past end of buffer --- code/ACLoader.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/ACLoader.cpp b/code/ACLoader.cpp index dac85b8db..642fd5d24 100644 --- a/code/ACLoader.cpp +++ b/code/ACLoader.cpp @@ -89,6 +89,9 @@ static const aiImporterDesc desc = { // ------------------------------------------------------------------------------------------------ // read a string (may be enclosed in double quotation marks). buffer must point to " #define AI_AC_GET_STRING(out) \ + if (*buffer == '\0') { \ + throw DeadlyImportError("AC3D: Unexpected EOF in string"); \ + } \ ++buffer; \ const char* sz = buffer; \ while ('\"' != *buffer) \