Fix some out of bound array access. (#862)

This commit is contained in:
Chris Purnell 2023-06-16 19:15:43 +01:00 committed by GitHub
parent f6a1cc598e
commit f0ef8f3cc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 19 deletions

View File

@ -150,23 +150,7 @@ namespace snd_core
/* +0x1E4 */ uint16 a1; /* +0x1E4 */ uint16 a1;
/* +0x1E6 */ uint16 a2; /* +0x1E6 */ uint16 a2;
}biquad; }biquad;
uint16 reserved1E8[1]; uint16 reserved1E8[0x18];
uint16 reserved1EA;
uint16 reserved1EC;
uint16 reserved1EE;
uint32 reserved1F0[4];
uint16 reserved200;
uint16 reserved202;
uint16 reserved204;
uint16 reserved206;
uint16 reserved208;
uint16 reserved20A;
uint16 reserved20C;
uint16 reserved20E;
uint16 reserved210;
uint16 reserved212;
uint16 reserved214;
uint16 reserved216;
uint16 reserved218[0x20]; // not related to device mix? uint16 reserved218[0x20]; // not related to device mix?
uint16 reserved258[0x10]; // not related to device mix? uint16 reserved258[0x10]; // not related to device mix?
// rmt src related // rmt src related

View File

@ -247,7 +247,7 @@ namespace snd
channel->drc_control[index].fader = 0; channel->drc_control[index].fader = 0;
channel->drc_control[index].lfe = -960; channel->drc_control[index].lfe = -960;
for (size_t i = 0; i < AX_MAX_NUM_BUS; ++i) for (size_t i = 0; i < AX_AUX_BUS_COUNT; ++i)
{ {
channel->drc_control[index].aux[i] = -960; channel->drc_control[index].aux[i] = -960;
} }
@ -272,7 +272,7 @@ namespace snd
channel->rmt_control[index].fader = 0; channel->rmt_control[index].fader = 0;
channel->rmt_control[index].lfe = -960; channel->rmt_control[index].lfe = -960;
for (size_t i = 0; i < AX_MAX_NUM_BUS; ++i) for (size_t i = 0; i < AX_AUX_BUS_COUNT; ++i)
{ {
channel->rmt_control[index].aux[i] = -960; channel->rmt_control[index].aux[i] = -960;
} }