diff options
| author | Scott Mansell <phiren@gmail.com> | 2026-08-11 12:30:54 +1200 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2026-08-11 12:30:54 +1200 |
| commit | 53cd8ffa3f798e9d4f6b263c7abafbc20a32489d (patch) | |
| tree | e4305c3c84371c379a5492ee00a9418b8650c280 /Source/Core/DiscIO/BannerLoaderGC.cpp | |
| parent | 216ffb4581af2075bf7a9f975219c375767cae15 (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/DiscIO/BannerLoaderGC.cpp')
0 files changed, 0 insertions, 0 deletions
