diff options
author | 2011-10-21 10:45:14 +0000 | |
---|---|---|
committer | 2011-10-21 10:45:14 +0000 | |
commit | ef3f7139ec86030a64ce4fed4976c0424fbc0637 (patch) | |
tree | 9943b9c35515c0f2a8c9234d42a12457858e94d7 | |
parent | ebuild fixes. Thanks to Justin Lecher for it (diff) | |
download | autodep-ef3f7139ec86030a64ce4fed4976c0424fbc0637.tar.gz autodep-ef3f7139ec86030a64ce4fed4976c0424fbc0637.tar.bz2 autodep-ef3f7139ec86030a64ce4fed4976c0424fbc0637.zip |
fixed a bug when some application using hooked functions before hook library is initialized
-rw-r--r-- | src/hook_lib/file_hook.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hook_lib/file_hook.c b/src/hook_lib/file_hook.c index 5630581..728ab4e 100644 --- a/src/hook_lib/file_hook.c +++ b/src/hook_lib/file_hook.c @@ -237,6 +237,9 @@ void _fini() { * Format of log string: time event filename stage result/err */ static int __raw_log_event(const char *event_type, const char *filename, char *result,int err, char* stage) { + if(! is_initialized) // it is essential to initialize hooks because we are + __init_hooks(); // using _snprintf here + char msg_buff[MAXSOCKETMSGLEN]; int bytes_to_send; if(strcmp(result,"ERR")==0) { |