fix: prevent oob access of sequenceMap (#2123)
Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
@@ -486,7 +486,7 @@ u8* AudioLoad_GetFontsForSequence(s32 seqId, u32* outNumFonts) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
u16 newSeqId = SfxEditor_GetReplacementSeq(seqId);
|
u16 newSeqId = SfxEditor_GetReplacementSeq(seqId);
|
||||||
if (!sequenceMap[newSeqId]){
|
if (newSeqId > MAX_SEQUENCES || !sequenceMap[newSeqId]) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
SequenceData sDat = ResourceMgr_LoadSeqByName(sequenceMap[newSeqId]);
|
SequenceData sDat = ResourceMgr_LoadSeqByName(sequenceMap[newSeqId]);
|
||||||
|
|||||||
Reference in New Issue
Block a user