Fix segmentation fault when chain_len option is missing '='.

This commit is contained in:
Carlos Maddela 2016-06-20 15:28:09 +10:00
parent 635ded3393
commit 0e3e2532d9

View File

@ -285,7 +285,7 @@ static void get_chain_data(proxy_data * pd, unsigned int *proxy_count, chain_typ
char *pc;
int len;
pc = strchr(buff, '=');
len = atoi(++pc);
len = pc ? atoi(++pc) : 0;
proxychains_max_chain = (len ? len : 1);
} else if(strstr(buff, "quiet_mode")) {
proxychains_quiet_mode = 1;