Skip to content

fix unbounded enumeration of oversized array notes - #1379

Open
zeapoz wants to merge 1 commit into
RetroAchievements:masterfrom
zeapoz:fix/unbounded-array-note-enumeration
Open

zeapoz wants to merge 1 commit into
RetroAchievements:masterfrom
zeapoz:fix/unbounded-array-note-enumeration

Conversation

@zeapoz

@zeapoz zeapoz commented Nov 25, 2026

Copy link
Copy Markdown

Currently, ExtractSize multiplies the array size and element size without validating the result when parsing array notes. The Memory Viewer draw call enumerates every single element, and EnumerateNotes inserts each derived note into a map. Consider a note like this:

[10737418232x4 bytes] Big Array
|0x0 = [4-byte] Field

This array note results in billions of insertions into the map each draw call, freezing the editor and allocating GBs of data before eventually OOMing.

This PR configures an upper cap of 4096 elements to guard against this.

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