mirror of
https://github.com/DaveGamble/cJSON.git
synced 2025-09-15 12:58:50 +08:00
fix the incorrect check in decode_array_index_from_pointer (#957)
Some checks failed
CI / linux (CLANG, ENABLE_SANITIZERS) (push) Has been cancelled
CI / linux (CLANG, ENABLE_VALGRIND) (push) Has been cancelled
CI / linux (CLANG, NONE_MEM_CHECK) (push) Has been cancelled
CI / linux (GCC, ENABLE_SANITIZERS) (push) Has been cancelled
CI / linux (GCC, ENABLE_VALGRIND) (push) Has been cancelled
CI / linux (GCC, NONE_MEM_CHECK) (push) Has been cancelled
CI / macos (CLANG, ENABLE_SANITIZERS) (push) Has been cancelled
CI / macos (CLANG, ENABLE_VALGRIND) (push) Has been cancelled
CI / macos (CLANG, NONE_MEM_CHECK) (push) Has been cancelled
CI / macos (GCC, ENABLE_SANITIZERS) (push) Has been cancelled
CI / macos (GCC, ENABLE_VALGRIND) (push) Has been cancelled
CI / macos (GCC, NONE_MEM_CHECK) (push) Has been cancelled
Some checks failed
CI / linux (CLANG, ENABLE_SANITIZERS) (push) Has been cancelled
CI / linux (CLANG, ENABLE_VALGRIND) (push) Has been cancelled
CI / linux (CLANG, NONE_MEM_CHECK) (push) Has been cancelled
CI / linux (GCC, ENABLE_SANITIZERS) (push) Has been cancelled
CI / linux (GCC, ENABLE_VALGRIND) (push) Has been cancelled
CI / linux (GCC, NONE_MEM_CHECK) (push) Has been cancelled
CI / macos (CLANG, ENABLE_SANITIZERS) (push) Has been cancelled
CI / macos (CLANG, ENABLE_VALGRIND) (push) Has been cancelled
CI / macos (CLANG, NONE_MEM_CHECK) (push) Has been cancelled
CI / macos (GCC, ENABLE_SANITIZERS) (push) Has been cancelled
CI / macos (GCC, ENABLE_VALGRIND) (push) Has been cancelled
CI / macos (GCC, NONE_MEM_CHECK) (push) Has been cancelled
this fixes CVE-2025-57052
This commit is contained in:
parent
8f2beb57dd
commit
74e1ff4994
@ -282,7 +282,7 @@ static cJSON_bool decode_array_index_from_pointer(const unsigned char * const po
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (position = 0; (pointer[position] >= '0') && (pointer[0] <= '9'); position++)
|
||||
for (position = 0; (pointer[position] >= '0') && (pointer[position] <= '9'); position++)
|
||||
{
|
||||
parsed_index = (10 * parsed_index) + (size_t)(pointer[position] - '0');
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user