mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-06 04:35:29 +02:00
BackgroundAudio Atrac3+: malloc a few extra bytes. Fixes crash reported by Verymelon
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user