Skip to content
Snippets Groups Projects
Commit b0f4bd16 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

ENH: add security for large files: stop search after 30 tested lines

parent 2afb8f9d
No related branches found
No related tags found
No related merge requests found
......@@ -726,6 +726,11 @@ int TestHelper::RegressionTestDiffFile(const char * testAsciiFileName, const cha
std::vector<unsigned int> differencesPosSelected;
for (curPosTest = posTest ; curPosTest < listLineFileTest.size() ; curPosTest++)
{
// stop searching after 30 lines tested
if (curPosTest > posTest + 30)
{
break;
}
std::string &curLineTest = listLineFileTest[curPosTest];
if (!IsLineValid(curLineTest,ignoredLines))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment