aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDmitry Janushkevich <gauri@tut.by>2016-05-02 13:59:26 +0200
committerAdministrator <gauri@tut.by>2016-05-03 10:22:06 +0200
commit64ce0ad3731ebd77e02897b07920eadd0e2cc318 (patch)
treec62094087ae441d6cb94cb20a3e2376dcdbaaf31 /doc
parent087ed94c452ecade26447c14605cd419e970cfd2 (diff)
downloadjansson-64ce0ad3731ebd77e02897b07920eadd0e2cc318.zip
jansson-64ce0ad3731ebd77e02897b07920eadd0e2cc318.tar.gz
jansson-64ce0ad3731ebd77e02897b07920eadd0e2cc318.tar.bz2
Fix for issue #282
The fix limits recursion depths when parsing arrays and objects. The limit is configurable via the `JSON_PARSER_MAX_DEPTH` setting within `jansson_config.h` and is set by default to 2048. Update the RFC conformance document to note the limit; the RFC allows limits to be set by the implementation so nothing has actually changed w.r.t. conformance state. Reported by Gustavo Grieco.
Diffstat (limited to 'doc')
-rw-r--r--doc/conformance.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/conformance.rst b/doc/conformance.rst
index de3947d..ea41d5c 100644
--- a/doc/conformance.rst
+++ b/doc/conformance.rst
@@ -108,3 +108,13 @@ types, ``long double``, etc. Obviously, shorter types like ``short``,
are implicitly handled via the ordinary C type coercion rules (subject
to overflow semantics). Also, no support or hooks are provided for any
supplemental "bignum" type add-on packages.
+
+Depth of nested values
+----------------------
+
+To avoid stack exhaustion, Jansson currently limits the nesting depth
+for arrays and objects to a certain value (default: 2048), defined as
+a macro ``JSON_PARSER_MAX_DEPTH`` within ``jansson_config.h``.
+
+The limit is allowed to be set by the RFC; there is no recommended value
+or required minimum depth to be supported.