From 5cb81f63b50f5dbb3ce208c734c5fe012522973b Mon Sep 17 00:00:00 2001 From: Jingxuan He Date: Fri, 23 Nov 2018 11:23:49 +0100 Subject: [PATCH] remove stack limit for training debin --- json/jsoncpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/jsoncpp.cpp b/json/jsoncpp.cpp index 59869c1..fbe6db6 100644 --- a/json/jsoncpp.cpp +++ b/json/jsoncpp.cpp @@ -352,7 +352,7 @@ bool Reader::readValue() { // But this deprecated class has a security problem: Bad input can // cause a seg-fault. This seems like a fair, binary-compatible way // to prevent the problem. - if (stackDepth_g >= stackLimit_g) throwRuntimeError("Exceeded stackLimit in readValue()."); + // if (stackDepth_g >= stackLimit_g) throwRuntimeError("Exceeded stackLimit in readValue()."); ++stackDepth_g; Token token; @@ -1279,7 +1279,7 @@ bool OurReader::parse(const char* beginDoc, } bool OurReader::readValue() { - if (stackDepth_ >= features_.stackLimit_) throwRuntimeError("Exceeded stackLimit in readValue()."); + // if (stackDepth_ >= features_.stackLimit_) throwRuntimeError("Exceeded stackLimit in readValue()."); ++stackDepth_; Token token; skipCommentTokens(token);