If the custom version is larger than 5 but smaller than 19 characters, truncate it

This commit is contained in:
Aurora 2016-09-18 18:31:16 +02:00
parent 85aaae67bf
commit 5a30b2b298
2 changed files with 6 additions and 2 deletions

View File

@ -109,7 +109,11 @@ static void loadCustomVerString(u16 *out, u32 *verStringSize)
else break; else break;
} }
if(finalSize > 0) *verStringSize = finalSize * 2; if(finalSize > 0)
{
if(finalSize > 5 && finalSize < 19) out[finalSize++] = 0;
*verStringSize = finalSize * 2;
}
} }
} }

View File

@ -373,7 +373,7 @@ static inline void patchNativeFirm(u32 firmVersion, FirmwareSource nandType, u32
//Find Kernel11 SVC table and handler, exceptions page and free space locations //Find Kernel11 SVC table and handler, exceptions page and free space locations
u32 baseK11VA; u32 baseK11VA;
u8 *freeK11Space; u8 *freeK11Space;
u32 *arm11SvcHandler, u32 *arm11SvcHandler,
*arm11ExceptionsPage, *arm11ExceptionsPage,
*arm11SvcTable = getKernel11Info(arm11Section1, section[1].size, &baseK11VA, &freeK11Space, &arm11SvcHandler, &arm11ExceptionsPage); *arm11SvcTable = getKernel11Info(arm11Section1, section[1].size, &baseK11VA, &freeK11Space, &arm11SvcHandler, &arm11ExceptionsPage);
#else #else