1
0
mirror of https://github.com/rofl0r/proxychains-ng synced 2026-05-21 05:09:50 +08:00

put a mutex lock around gethostent() usage, to prevent internal

races. the external usage was covered by the latest commit.
This commit is contained in:
rofl0r
2012-11-04 05:23:51 +01:00
Unverified
parent 8ce1e51a60
commit e05cafc8e2
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -45,6 +45,7 @@ extern internal_ip_lookup_table internal_ips;
#ifdef THREAD_SAFE
#include <pthread.h>
extern pthread_mutex_t internal_ips_lock;
extern pthread_mutex_t hostdb_lock;
# define MUTEX_LOCK(x) pthread_mutex_lock(x)
# define MUTEX_UNLOCK(x) pthread_mutex_unlock(x)
# define MUTEX_INIT(x,y) pthread_mutex_init(x, y)