Put back byte array to stack and increase buffer size

This commit is contained in:
raven02 2012-12-25 09:06:27 +08:00
parent 3b730eb96a
commit 49e9a5738c

View File

@ -576,9 +576,9 @@ static TAG_INFO2 *GetTagInfo2(u32 tagFind)
}
// Moving these out here is a really ugly hack to avoid a stack corruption warning, warranted or not
static u8 padding1[0x100];
static u8 tmp1[0x150], tmp2[0x90+0x14], tmp3[0x60+0x14], tmp4[0x20];
static u8 padding2[0x100];
//static u8 padding1[0x100];
//static u8 tmp1[0x150], tmp2[0x90+0x14], tmp3[0x60+0x14], tmp4[0x20];
//static u8 padding2[0x100];
static int DecryptPRX2(const u8 *inbuf, u8 *outbuf, u32 size, u32 tag)
{
@ -590,10 +590,11 @@ static int DecryptPRX2(const u8 *inbuf, u8 *outbuf, u32 size, u32 tag)
}
int retsize = *(int *)&inbuf[0xB0];
u8 tmp1[0x150], tmp2[0x90+0x14], tmp3[0x90+0x14], tmp4[0x20];
memset(tmp1, 0, 0x150);
memset(tmp2, 0, 0x90+0x14);
memset(tmp3, 0, 0x60+0x14);
memset(tmp3, 0, 0x90+0x14);
memset(tmp4, 0, 0x20);
if (inbuf != outbuf)