aboutsummaryrefslogtreecommitdiff
path: root/android
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 /android
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 'android')
-rw-r--r--android/jansson_config.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/android/jansson_config.h b/android/jansson_config.h
index 0a313a0..689f7ed 100644
--- a/android/jansson_config.h
+++ b/android/jansson_config.h
@@ -36,4 +36,8 @@
otherwise to 0. */
#define JSON_HAVE_LOCALECONV 0
+/* Maximum recursion depth for parsing JSON input.
+ This limits the depth of e.g. array-within-array constructions. */
+#define JSON_PARSER_MAX_DEPTH 2048
+
#endif