diff options
author | Alexander Batischev <eual.jp@gmail.com> | 2016-02-01 20:58:59 +0300 |
---|---|---|
committer | rofl0r <retnyg@gmx.net> | 2016-02-04 12:37:06 +0300 |
commit | f85cecdabea90db31dc2891c404ccee4bc655354 (patch) | |
tree | 4d697f2fc91f3f6717f820cfc44a8de4181f5ef1 | |
parent | 672bf7661d7d9c5a66a5f4f2bbb835757b58024e (diff) |
Fix bug in hostsreader
hostsreader_get() used to assign the IP address to both `name` and `ip`
fields in `struct hostsreader`, which led to proxychains effectively
ignoring the contents of /etc/hosts.
-rw-r--r-- | src/hostsreader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hostsreader.c b/src/hostsreader.c index 6589f9f..2e6a4f1 100644 --- a/src/hostsreader.c +++ b/src/hostsreader.c @@ -44,7 +44,7 @@ int hostsreader_get(struct hostsreader *ctx, char* buf, size_t bufsize) { l--; } if(!l || !*p) continue; - ctx->name = buf; + ctx->name = p; while(*p && !isspace(*p) && l) { p++; l--; |