mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Add a safety check.
This commit is contained in:
parent
fa4a50de23
commit
f39b1625af
@ -58,7 +58,12 @@ public:
|
||||
|
||||
if (codec == PSP_CODEC_AT3) {
|
||||
// The first two bytes are actually not useful part of the extradata.
|
||||
file_.readData(at3_extradata, 16);
|
||||
// We already read 16 bytes, so make sure there's enough left.
|
||||
if (file_.getCurrentChunkSize() >= 32) {
|
||||
file_.readData(at3_extradata, 16);
|
||||
} else {
|
||||
memset(at3_extradata, 0, sizeof(at3_extradata));
|
||||
}
|
||||
}
|
||||
file_.ascend();
|
||||
// ILOG("got fmt data: %i", samplesPerSec);
|
||||
|
Loading…
Reference in New Issue
Block a user