From a733a5092b404276af646b522430466df19a1612 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Sat, 30 Jul 2016 23:40:55 +0200 Subject: Fix wrong pointer variable in stat64 wrapper If a program would have called stat() and then stat64(), the traced program probably would crash with a NULL pointer access on orig_stat64. I've checked for similiar glitches in the other wrappers -> they looked ok. --- src/libtracelog/libtracelog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libtracelog') diff --git a/src/libtracelog/libtracelog.c b/src/libtracelog/libtracelog.c index 3e65587c4..dedba5513 100644 --- a/src/libtracelog/libtracelog.c +++ b/src/libtracelog/libtracelog.c @@ -562,7 +562,7 @@ int stat64(const char *pathname, struct stat64 *buf) { #ifdef DEBUG printf("%s %s\n", __FUNCTION__, pathname); #endif - if (!orig_stat) + if (!orig_stat64) orig_stat64 = (orig_stat64_t)dlsym(RTLD_NEXT, "stat64"); if (!blacklist_loaded) load_blacklist(); @@ -598,7 +598,7 @@ int lstat64(const char *pathname, struct stat64 *buf) { #ifdef DEBUG printf("%s %s\n", __FUNCTION__, pathname); #endif - if (!orig_lstat) + if (!orig_lstat64) orig_lstat64 = (orig_lstat64_t)dlsym(RTLD_NEXT, "lstat64"); if (!blacklist_loaded) load_blacklist(); -- cgit v1.2.3-54-g00ecf