Skip to content

return RC_INVALID_VALUE if expecting array of objects and got array of primitives - #553

Merged
Jamiras merged 2 commits into
RetroAchievements:developfrom
Jamiras:bugfix/json_obj_arr
Oct 4, 2026
Merged

Jamiras merged 2 commits into
RetroAchievements:developfrom
Jamiras:bugfix/json_obj_arr

Conversation

@Jamiras

@Jamiras Jamiras commented Oct 1, 2026

Copy link
Copy Markdown
Member

Handles a case where the JSON parser encounters an array of primitives after allocating memory for an array of objects, but leaves the memory uninitialized and returns RC_OK because there were no more sub-objects to process.

Reported by user using AI-assisted security audit. It is unlikely that the server will send us valid JSON that doesn't conform to the expected contract.

@Jamiras Jamiras added this to the 13.0 milestone Oct 1, 2026
@Jamiras
Jamiras merged commit c0a3ebd into RetroAchievements:develop Oct 4, 2026
6 checks passed
@Jamiras
Jamiras deleted the bugfix/json_obj_arr branch October 4, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant