From e4742bcafb06c6294b74aa45ec5155760d01bcb0 Mon Sep 17 00:00:00 2001 From: Alexandre-Xavier Date: Tue, 29 Aug 2023 01:07:44 +0000 Subject: [PATCH 1/2] Fix array out of bound in decoder.c --- src/lib/mp3/decoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/mp3/decoder.c b/src/lib/mp3/decoder.c index 81f62eb01..7b3946a45 100644 --- a/src/lib/mp3/decoder.c +++ b/src/lib/mp3/decoder.c @@ -2730,8 +2730,8 @@ bool mp3dec000427d8(struct asistream *stream, u32 gr) f32 *sp0c = stream->unk4664[0][0].unk00; s32 i = 0; - if (stream->window_switching[gr][0] && stream->window_switching[gr][2] == 2) { - if (stream->window_switching[gr][4]) { + if (stream->window_switching[gr][0] && stream->block_type[gr][0] == 2) { + if (stream->mixed_block_flag[gr][0]) { while (i++ < 36) { *(sp10++) = *(sp0c++); } From 0235a971d6fb1a0d4421856d5a65aa8067bd4658 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 29 Aug 2023 21:36:58 +1000 Subject: [PATCH 2/2] Fix bot name array overflow --- src/include/types.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/include/types.h b/src/include/types.h index c56b33607..9cd9f2aed 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -3954,10 +3954,7 @@ struct gamefile { }; struct mpchrconfig { - /*0x00*/ char name[12]; // up to 10 visible chars plus line break plus null byte - /*0x0c*/ u8 unk0c; - /*0x0d*/ u8 unk0d; - /*0x0e*/ u8 unk0e; + /*0x00*/ char name[15]; /*0x0f*/ u8 mpheadnum; /*0x10*/ u8 mpbodynum; /*0x11*/ u8 team;