An OOM vulnerability exists in the json_pointer_set function (and related functions).
See issue #916 for more details.
To fix that, added a sanity check in the is_valid_index function to limit the maximum value of a parsed array index.
Provided a configurable macro for modification.
Signed-off-by: lone <lonechan314@qq.com>