diff --git a/lib/oxrdf/src/parser.rs b/lib/oxrdf/src/parser.rs index 43f759dc..a0d64dc8 100644 --- a/lib/oxrdf/src/parser.rs +++ b/lib/oxrdf/src/parser.rs @@ -10,7 +10,7 @@ use std::str::{Chars, FromStr}; /// This limit is set in order to avoid stack overflow error when parsing nested triples due to too many recursive calls. /// The actual limit value is a wet finger compromise between not failing to parse valid files and avoiding to trigger stack overflow errors. -const MAX_NUMBER_OF_NESTED_TRIPLES: usize = 512; +const MAX_NUMBER_OF_NESTED_TRIPLES: usize = 128; impl FromStr for NamedNode { type Err = TermParseError; diff --git a/lib/sparesults/src/json.rs b/lib/sparesults/src/json.rs index 7514e69e..86a5e3da 100644 --- a/lib/sparesults/src/json.rs +++ b/lib/sparesults/src/json.rs @@ -10,7 +10,7 @@ use std::io::{self, BufRead, Write}; /// This limit is set in order to avoid stack overflow error when parsing nested triples due to too many recursive calls. /// The actual limit value is a wet finger compromise between not failing to parse valid files and avoiding to trigger stack overflow errors. -const MAX_NUMBER_OF_NESTED_TRIPLES: usize = 256; +const MAX_NUMBER_OF_NESTED_TRIPLES: usize = 128; pub fn write_boolean_json_result(sink: W, value: bool) -> io::Result { let mut writer = JsonWriter::from_writer(sink);