From 5a30b2b2984bf6ff3b165a38d8f98bd863663e8e Mon Sep 17 00:00:00 2001 From: Aurora Date: Sun, 18 Sep 2016 18:31:16 +0200 Subject: [PATCH] If the custom version is larger than 5 but smaller than 19 characters, truncate it --- injector/source/patcher.c | 6 +++++- source/firm.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/injector/source/patcher.c b/injector/source/patcher.c index eb3f041..e14da7b 100644 --- a/injector/source/patcher.c +++ b/injector/source/patcher.c @@ -109,7 +109,11 @@ static void loadCustomVerString(u16 *out, u32 *verStringSize) else break; } - if(finalSize > 0) *verStringSize = finalSize * 2; + if(finalSize > 0) + { + if(finalSize > 5 && finalSize < 19) out[finalSize++] = 0; + *verStringSize = finalSize * 2; + } } } diff --git a/source/firm.c b/source/firm.c index 341c3cf..58dca4b 100755 --- a/source/firm.c +++ b/source/firm.c @@ -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 u32 baseK11VA; u8 *freeK11Space; - u32 *arm11SvcHandler, + u32 *arm11SvcHandler, *arm11ExceptionsPage, *arm11SvcTable = getKernel11Info(arm11Section1, section[1].size, &baseK11VA, &freeK11Space, &arm11SvcHandler, &arm11ExceptionsPage); #else