浏览代码

Fix infinite loop in PLY parser

Fixes testcase hangs/9ab979ab256c70aaec9b651f32f051e9
Turo Lamminen 10 年之前
父节点
当前提交
fe89773c6f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      code/PlyParser.cpp

+ 1 - 1
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);