Skip to content

Fix OOB access#332

Merged
Blixibon merged 1 commit into
mapbase-source:developfrom
samisalreadytaken:fix-oob
Jan 4, 2025
Merged

Fix OOB access#332
Blixibon merged 1 commit into
mapbase-source:developfrom
samisalreadytaken:fix-oob

Conversation

@samisalreadytaken

Copy link
Copy Markdown

When the loop fails its i < 48 condition, it will access out of array bounds on GetWeapon right after. This was mostly benign because CHandle m_hMyWeapons[48] is followed by CHandle m_hActiveWeapon in memory, so m_hMyWeapons[48] would access m_hActiveWeapon, which would always be null because the entity can't have an active weapon with no weapons.


PR Checklist

  • My PR follows all guidelines in the CONTRIBUTING.md file
  • My PR targets a develop branch OR targets another branch with a specific goal in mind

@Blixibon
Blixibon merged commit de59834 into mapbase-source:develop Jan 4, 2025
@samisalreadytaken
samisalreadytaken deleted the fix-oob branch May 31, 2026 15:29
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.

2 participants