From 91eeed6408224a3b768aa57c6f036ab71bf0f2eb Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Tue, 6 Nov 2012 15:46:00 +0100 Subject: [PATCH] Hack to prevent stack checker from alerting --- Core/ELF/PrxDecrypter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/ELF/PrxDecrypter.cpp b/Core/ELF/PrxDecrypter.cpp index b6e7f2f73b..4419dcd665 100644 --- a/Core/ELF/PrxDecrypter.cpp +++ b/Core/ELF/PrxDecrypter.cpp @@ -575,6 +575,11 @@ static TAG_INFO2 *GetTagInfo2(u32 tagFind) return NULL; // not found } +// 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 int DecryptPRX2(const u8 *inbuf, u8 *outbuf, u32 size, u32 tag) { TAG_INFO2 * pti = GetTagInfo2(tag); @@ -585,7 +590,6 @@ static int DecryptPRX2(const u8 *inbuf, u8 *outbuf, u32 size, u32 tag) } int retsize = *(int *)&inbuf[0xB0]; - u8 tmp1[0x150], tmp2[0x90+0x14], tmp3[0x60+0x14], tmp4[0x20]; memset(tmp1, 0, 0x150); memset(tmp2, 0, 0x90+0x14);