Skip to content

Fix Amiga sprite left-clip negative X underwrite#119

Merged
segrax merged 1 commit into
masterfrom
codex/propose-fix-for-sprite-clipping-vulnerability
May 24, 2026
Merged

Fix Amiga sprite left-clip negative X underwrite#119
segrax merged 1 commit into
masterfrom
codex/propose-fix-for-sprite-clipping-vulnerability

Conversation

@segrax

@segrax segrax commented May 24, 2026

Copy link
Copy Markdown
Member

Motivation

  • Prevent negative sprite X positions from surviving left-edge clipping in the Amiga renderer and causing an out-of-bounds write in Video_Draw_8 when mVideo_Draw_PosX can be -1.

Description

  • Add a post-left-clip safety check in cGraphics_Amiga::Sprite_OnScreen_Check(bool) that returns false if mVideo_Draw_PosX < 0, implemented as a minimal three-line change in Source/Amiga/Graphics_Amiga.cpp to reject sprites that would underwrite the surface buffer.

Testing

  • No full automated test suite was executed due to missing SDL development headers in the environment, and the change was verified via source-level checks (git diff and nl -ba) which confirmed the intended insertions.

Codex Task

@segrax segrax merged commit 0070f5b into master May 24, 2026
2 of 6 checks passed
@segrax segrax deleted the codex/propose-fix-for-sprite-clipping-vulnerability branch May 24, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant