From 93256124a6116e070f7857d9fe04bf6139dfbaee Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Fri, 13 Jan 2012 19:00:13 +1030 Subject: Change default nesting limits to 1000 Increase the default nesting limits to reduce the chance of accidently throwing an error on valid JSON out of the box. --- lua_cjson.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua_cjson.c') diff --git a/lua_cjson.c b/lua_cjson.c index 1e9e91d..772790e 100644 --- a/lua_cjson.c +++ b/lua_cjson.c @@ -62,8 +62,8 @@ #define DEFAULT_SPARSE_CONVERT 0 #define DEFAULT_SPARSE_RATIO 2 #define DEFAULT_SPARSE_SAFE 10 -#define DEFAULT_ENCODE_MAX_DEPTH 20 -#define DEFAULT_DECODE_MAX_DEPTH 20 +#define DEFAULT_ENCODE_MAX_DEPTH 1000 +#define DEFAULT_DECODE_MAX_DEPTH 1000 #define DEFAULT_ENCODE_INVALID_NUMBERS 0 #define DEFAULT_DECODE_INVALID_NUMBERS 1 #define DEFAULT_ENCODE_KEEP_BUFFER 1 -- cgit v1.2.3-55-g6feb