diff options
Diffstat (limited to 'src/audit.c')
| -rw-r--r-- | src/audit.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/audit.c b/src/audit.c index 97cbaf3..e942a58 100644 --- a/src/audit.c +++ b/src/audit.c @@ -41,6 +41,7 @@ static __thread int pipe_fd = 0; static __thread int flow_below_stack = 0; static __thread int indent_depth = 0; +int check_malloc_hook(void); static int check_names(char *name, char **ptr) { @@ -203,6 +204,12 @@ do { \ return ret; \ } while(0) +#define CHECK_MALLOC_HOOK() \ +do { \ + if (check_malloc_hook()) \ + return -1; \ +} while(0) + unsigned int la_version(unsigned int v) { return v; @@ -274,7 +281,7 @@ static unsigned int la_symbind(ElfW(Sym) *sym, const char *symname) void la_activity(uintptr_t *cookie, unsigned int act) { - PRINT_VERBOSE(&cfg, 2, "%s\n", "entry"); +// PRINT_VERBOSE(&cfg, 2, "%s\n", "entry"); } char* la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag) @@ -323,6 +330,8 @@ pltenter(ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook, do { CHECK_DISABLED(sym->st_value); + CHECK_MALLOC_HOOK(); + CHECK_PID(sym->st_value); sym_entry(symname, (void*) sym->st_value, |
