We do not use this
This commit is contained in:
parent
fc151f7595
commit
024335e5cd
@ -46,11 +46,9 @@ static u8 *memsearch(u8 *startPos, const void *pattern, u32 size, u32 patternSiz
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 patchMemory(u8 *start, u32 size, const void *pattern, u32 patSize, int offset, const void *replace, u32 repSize, u32 count)
|
static void patchMemory(u8 *start, u32 size, const void *pattern, u32 patSize, int offset, const void *replace, u32 repSize, u32 count)
|
||||||
{
|
{
|
||||||
u32 i;
|
for(u32 i = 0; i < count; i++)
|
||||||
|
|
||||||
for(i = 0; i < count; i++)
|
|
||||||
{
|
{
|
||||||
u8 *found = memsearch(start, pattern, size, patSize);
|
u8 *found = memsearch(start, pattern, size, patSize);
|
||||||
|
|
||||||
@ -65,8 +63,6 @@ static u32 patchMemory(u8 *start, u32 size, const void *pattern, u32 patSize, in
|
|||||||
size -= at + patSize;
|
size -= at + patSize;
|
||||||
start = found + patSize;
|
start = found + patSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
return i;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline size_t strnlen(const char *string, size_t maxlen)
|
static inline size_t strnlen(const char *string, size_t maxlen)
|
||||||
|
@ -29,9 +29,9 @@ void main(void)
|
|||||||
{
|
{
|
||||||
void *payloadAddress = (void *)0x23F00000;
|
void *payloadAddress = (void *)0x23F00000;
|
||||||
|
|
||||||
memcpy(payloadAddress, (void*)0x24F00000, payloadSize);
|
memcpy(payloadAddress, (void *)0x24F00000, payloadSize);
|
||||||
|
|
||||||
flushCaches();
|
flushCaches();
|
||||||
|
|
||||||
((void (*)())payloadAddress)();
|
((void (*)())payloadAddress)();
|
||||||
}
|
}
|
Reference in New Issue
Block a user