mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 11:08:06 +00:00
Fixes to formatting
This commit is contained in:
@ -38,13 +38,14 @@ extern mach_port_t mach_task_self();
|
|||||||
extern GumAddress gum_darwin_find_entrypoint(mach_port_t task);
|
extern GumAddress gum_darwin_find_entrypoint(mach_port_t task);
|
||||||
#elif defined(__ANDROID__)
|
#elif defined(__ANDROID__)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
||||||
void (**preinit_array)(void);
|
void (**preinit_array)(void);
|
||||||
void (**init_array)(void);
|
void (**init_array)(void);
|
||||||
void (**fini_array)(void);
|
void (**fini_array)(void);
|
||||||
|
|
||||||
} structors_array_t;
|
} structors_array_t;
|
||||||
|
|
||||||
extern void __libc_init(void* raw_args,
|
extern void __libc_init(void *raw_args, void (*onexit)(void) __unused,
|
||||||
void (*onexit)(void) __unused,
|
|
||||||
int (*slingshot)(int, char **, char **),
|
int (*slingshot)(int, char **, char **),
|
||||||
structors_array_t const *const structors);
|
structors_array_t const *const structors);
|
||||||
#else
|
#else
|
||||||
@ -291,17 +292,19 @@ static void intercept_main(void) {
|
|||||||
intercept_hook(main, on_main, NULL);
|
intercept_hook(main, on_main, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(__ANDROID__)
|
#elif defined(__ANDROID__)
|
||||||
static void on_libc_init(void* raw_args,
|
static void on_libc_init(void *raw_args, void (*onexit)(void) __unused,
|
||||||
void (*onexit)(void) __unused,
|
|
||||||
int (*slingshot)(int, char **, char **),
|
int (*slingshot)(int, char **, char **),
|
||||||
structors_array_t const *const structors) {
|
structors_array_t const *const structors) {
|
||||||
|
|
||||||
main_fn = slingshot;
|
main_fn = slingshot;
|
||||||
intercept_unhook_self();
|
intercept_unhook_self();
|
||||||
intercept_hook(slingshot, on_main, NULL);
|
intercept_hook(slingshot, on_main, NULL);
|
||||||
return __libc_init(raw_args, onexit, slingshot, structors);
|
return __libc_init(raw_args, onexit, slingshot, structors);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void intercept_main(void) {
|
static void intercept_main(void) {
|
||||||
|
|
||||||
intercept_hook(__libc_init, on_libc_init, NULL);
|
intercept_hook(__libc_init, on_libc_init, NULL);
|
||||||
|
@ -307,6 +307,7 @@ void prefetch_init(void) {
|
|||||||
FFATAL("shmctl (IPC_RMID) < 0 - errno: %d\n", errno);
|
FFATAL("shmctl (IPC_RMID) < 0 - errno: %d\n", errno);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Clear it, not sure it's necessary, just seems like good practice */
|
/* Clear it, not sure it's necessary, just seems like good practice */
|
||||||
|
Reference in New Issue
Block a user