| 1119 | } |
| 1120 | |
| 1121 | static void json_decode_descend(lua_State *l, json_parse_t *json, int slots) |
| 1122 | { |
| 1123 | json->current_depth++; |
| 1124 | |
| 1125 | if (json->current_depth <= json->cfg->decode_max_depth && |
| 1126 | lua_checkstack(l, slots)) { |
| 1127 | return; |
| 1128 | } |
| 1129 | |
| 1130 | strbuf_free(json->tmp); |
| 1131 | luaL_error(l, "Found too many nested data structures (%d) at character %d", |
| 1132 | json->current_depth, json->ptr - json->data); |
| 1133 | } |
| 1134 | |
| 1135 | static void json_parse_object_context(lua_State *l, json_parse_t *json) |
| 1136 | { |
no test coverage detected