3939// Define JSONCPP_DEPRECATED_STACK_LIMIT as an appropriate integer at compile
4040// time to change the stack limit
4141#if !defined(JSONCPP_DEPRECATED_STACK_LIMIT)
42- #define JSONCPP_DEPRECATED_STACK_LIMIT 1000
42+ #define JSONCPP_DEPRECATED_STACK_LIMIT 256
4343#endif
4444
4545static size_t const stackLimit_g =
@@ -1932,7 +1932,7 @@ void CharReaderBuilder::strictMode(Json::Value* settings) {
19321932 (*settings)[" allowDroppedNullPlaceholders" ] = false ;
19331933 (*settings)[" allowNumericKeys" ] = false ;
19341934 (*settings)[" allowSingleQuotes" ] = false ;
1935- (*settings)[" stackLimit" ] = 1000 ;
1935+ (*settings)[" stackLimit" ] = 256 ;
19361936 (*settings)[" failIfExtra" ] = true ;
19371937 (*settings)[" rejectDupKeys" ] = true ;
19381938 (*settings)[" allowSpecialFloats" ] = false ;
@@ -1949,7 +1949,7 @@ void CharReaderBuilder::setDefaults(Json::Value* settings) {
19491949 (*settings)[" allowDroppedNullPlaceholders" ] = false ;
19501950 (*settings)[" allowNumericKeys" ] = false ;
19511951 (*settings)[" allowSingleQuotes" ] = false ;
1952- (*settings)[" stackLimit" ] = 1000 ;
1952+ (*settings)[" stackLimit" ] = 256 ;
19531953 (*settings)[" failIfExtra" ] = false ;
19541954 (*settings)[" rejectDupKeys" ] = false ;
19551955 (*settings)[" allowSpecialFloats" ] = false ;
@@ -1965,7 +1965,7 @@ void CharReaderBuilder::ecma404Mode(Json::Value* settings) {
19651965 (*settings)[" allowDroppedNullPlaceholders" ] = false ;
19661966 (*settings)[" allowNumericKeys" ] = false ;
19671967 (*settings)[" allowSingleQuotes" ] = false ;
1968- (*settings)[" stackLimit" ] = 1000 ;
1968+ (*settings)[" stackLimit" ] = 256 ;
19691969 (*settings)[" failIfExtra" ] = true ;
19701970 (*settings)[" rejectDupKeys" ] = false ;
19711971 (*settings)[" allowSpecialFloats" ] = false ;
0 commit comments