Skip to content

W3DTreeBuffer: Add bounds checks for treeType index access - #188

Open
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/w3d-tree-type-bounds-check
Open

W3DTreeBuffer: Add bounds checks for treeType index access#188
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/w3d-tree-type-bounds-check

Conversation

@seer-by-sentry

@seer-by-sentry seer-by-sentry Bot commented Jan 1, 2026

Copy link
Copy Markdown

Fixes CLIENT-18Y. The issue was that: W3DTreeBuffer::unitMoved reads a corrupted index from m_areaPartition, causing an access violation when dereferencing m_trees.

  • Added bounds checking for the treeType index before accessing the m_treeTypes array in W3DTreeBuffer::ApplyCrushDamage, preventing out-of-bounds reads.
  • Added bounds checking for treeType in W3DTreeBuffer::AddTree when setting tree bounds.
  • Added bounds checking for treeType in W3DTreeBuffer::pushAsideTree when calculating pushAsideDelta.
  • Extracted m_trees[i].treeType into a local variable (treeType) for consistency and readability across the modified functions.

This fix was generated by Seer in Sentry, triggered automatically. 👁️ Run ID: 8092206

Not quite right? Click here to continue debugging with Seer.

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.

0 participants