mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Add a safety check.
This commit is contained in:
parent
fa4a50de23
commit
f39b1625af
1 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue