summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/TextureEncoder.cpp
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2026-08-11 12:30:54 +1200
committerOatmealDome <julian@oatmealdome.me>2026-08-10 22:47:42 -0400
commit74857b28bb5e9c1d7c2fd083e3908252f85ad0cd (patch)
treef95f55483655e6fd88422825aaecc4041f3e1f12 /Source/Core/VideoBackends/Software/TextureEncoder.cpp
parent5888eb6eb6f2f9107fe2ab8280cfdc3a8dd59ea9 (diff)
Fix stack overflow in ZeldaHLE
Independently spotted by both @Dentomologist and me while reviewing PR #14805 The previous limit was correct for valid VPBs, but an invalid VPB controlled by a malicious game could contain a non-fractional value in current_pos_frac, which would allow writing an extra 15 samples (30 bytes) into the stack. With AFC encoding, this is rounded up to 16 samples, but with much less control over which bytes are written. Maybe we should be doing some validation, or bounds checking, but I'm pretty sure this issue was copied from the original ucode, and we kinda want to stay compatible. The simpler fix is to just increase the size of raw_input_samples. I've checked other code paths, and 0x514 samples seems to be the limit.
Diffstat (limited to 'Source/Core/VideoBackends/Software/TextureEncoder.cpp')
0 files changed, 0 insertions, 0 deletions