mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
BackgroundAudio Atrac3+: malloc a few extra bytes. Fixes crash reported by Verymelon
This commit is contained in:
parent
3ee3af2dff
commit
1a1b79606b
@ -146,7 +146,9 @@ void WavData::Read(RIFFReader &file_) {
|
||||
int numBytes = file_.GetCurrentChunkSize();
|
||||
numFrames = numBytes / raw_bytes_per_frame; // numFrames
|
||||
|
||||
raw_data = (uint8_t *)malloc(numBytes);
|
||||
// It seems the atrac3 codec likes to read a little bit outside.
|
||||
int padding = 16;
|
||||
raw_data = (uint8_t *)malloc(numBytes + padding);
|
||||
raw_data_size = numBytes;
|
||||
|
||||
if (num_channels == 1 || num_channels == 2) {
|
||||
|
Loading…
Reference in New Issue
Block a user