From fe89773c6fb10bd1a06f692ba9af473f2f625b31 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Sun, 1 Feb 2015 00:22:32 +0200 Subject: [PATCH] Fix infinite loop in PLY parser Fixes testcase hangs/9ab979ab256c70aaec9b651f32f051e9 --- code/PlyParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/PlyParser.cpp b/code/PlyParser.cpp index 6687ca9ed..7c2165983 100644 --- a/code/PlyParser.cpp +++ b/code/PlyParser.cpp @@ -436,7 +436,7 @@ bool PLY::DOM::ParseHeader (const char* pCur,const char** pCurOut,bool isBinary) *pCurOut = pCur; // parse all elements - while (true) + while ((*pCur) != '\0') { // skip all comments PLY::DOM::SkipComments(pCur,&pCur);