Skip to content
Permalink
Browse files

Fixed cloning of hostend structs.

The h_addr is only a #define to h_addr_list[0], leading to overwriting the new h_addr_list[0] with the old (src) value.

Credits to Dan Pascu (@danpascu) for reporting and assisting with the troubleshooting.

(cherry picked from commit 5f1ec37)
  • Loading branch information...
bogdan-iancu committed Dec 3, 2018
1 parent 52e3ada commit 588bb645045f9b79aec57c5c24436e97f54a8c66
Showing with 1 addition and 1 deletion.
  1. +1 −1 proxy.c
@@ -76,7 +76,7 @@ int hostent_shm_cpy(struct hostent *dst, struct hostent* src)
p += src->h_length;
}

dst->h_addr = src->h_addr_list[0];
dst->h_addr = dst->h_addr_list[0];
dst->h_addrtype = src->h_addrtype;
dst->h_length = src->h_length;
return 0;

0 comments on commit 588bb64

Please sign in to comment.
You can’t perform that action at this time.