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
parent 8ce1e51a60
commit e05cafc8e2
3 changed files with 6 additions and 0 deletions

View File

@ -93,6 +93,7 @@ static void* load_sym(char* symname, void* proxyfunc) {
static void do_init(void) {
MUTEX_INIT(&internal_ips_lock, NULL);
MUTEX_INIT(&hostdb_lock, NULL);
/* read the config file */
get_chain_data(proxychains_pd, &proxychains_proxy_count, &proxychains_ct);