diff options
author | RedMser <redmser.jj2@gmail.com> | 2022-09-19 18:10:23 +0200 |
---|---|---|
committer | RedMser <redmser.jj2@gmail.com> | 2022-09-19 18:22:55 +0200 |
commit | de3b1c3fca9907afbfaa57f98a38d07e4cadca0d (patch) | |
tree | ca2eb82062219f6483e11243e20b73e0cd578bbc /core/io/json.h | |
parent | 63c0dc690e06731224e88911ed16d1b798b681b5 (diff) | |
download | redot-engine-de3b1c3fca9907afbfaa57f98a38d07e4cadca0d.tar.gz |
Add recursion depth check to JSON stringify/parse
Diffstat (limited to 'core/io/json.h')
-rw-r--r-- | core/io/json.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/io/json.h b/core/io/json.h index 208d4ad625..829a5f922b 100644 --- a/core/io/json.h +++ b/core/io/json.h @@ -74,9 +74,9 @@ class JSON : public RefCounted { static String _make_indent(const String &p_indent, int p_size); static String _stringify(const Variant &p_var, const String &p_indent, int p_cur_indent, bool p_sort_keys, HashSet<const void *> &p_markers, bool p_full_precision = false); static Error _get_token(const char32_t *p_str, int &index, int p_len, Token &r_token, int &line, String &r_err_str); - static Error _parse_value(Variant &value, Token &token, const char32_t *p_str, int &index, int p_len, int &line, String &r_err_str); - static Error _parse_array(Array &array, const char32_t *p_str, int &index, int p_len, int &line, String &r_err_str); - static Error _parse_object(Dictionary &object, const char32_t *p_str, int &index, int p_len, int &line, String &r_err_str); + static Error _parse_value(Variant &value, Token &token, const char32_t *p_str, int &index, int p_len, int &line, int p_depth, String &r_err_str); + static Error _parse_array(Array &array, const char32_t *p_str, int &index, int p_len, int &line, int p_depth, String &r_err_str); + static Error _parse_object(Dictionary &object, const char32_t *p_str, int &index, int p_len, int &line, int p_depth, String &r_err_str); static Error _parse_string(const String &p_json, Variant &r_ret, String &r_err_str, int &r_err_line); protected: |