Skip to content

Commit 74e1ff4

Browse files
fix the incorrect check in decode_array_index_from_pointer (#957)
this fixes CVE-2025-57052
1 parent 8f2beb5 commit 74e1ff4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cJSON_Utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static cJSON_bool decode_array_index_from_pointer(const unsigned char * const po
282282
return 0;
283283
}
284284

285-
for (position = 0; (pointer[position] >= '0') && (pointer[0] <= '9'); position++)
285+
for (position = 0; (pointer[position] >= '0') && (pointer[position] <= '9'); position++)
286286
{
287287
parsed_index = (10 * parsed_index) + (size_t)(pointer[position] - '0');
288288

0 commit comments

Comments
 (0)