From: lone Date: Mon, 26 Jan 2026 09:54:53 +0000 (+0800) Subject: amend: removed marco related logic X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c3b98ddb5b02e36c8f63b3dbd76ff3a827b722c;p=thirdparty%2Fjson-c.git amend: removed marco related logic Signed-off-by: lone --- diff --git a/json_pointer.c b/json_pointer.c index edaabca..82df021 100644 --- a/json_pointer.c +++ b/json_pointer.c @@ -79,16 +79,6 @@ static int is_valid_index(const char *path, size_t *idx) // but ULLONG_MAX will be longer than any array length so that's ok. *idx = strtoull(path, NULL, 10); - // Check against a maximum to prevent excessive memory allocations. - // An extremely large index, even if it doesn't overflow size_t, - // will cause a huge memory allocation request via realloc, - // leading to an OOM. - if (*idx > JSON_C_POINTER_MAX_ARRAY_IDX) - { - errno = EINVAL; - return 0; - } - return 1; }