diff options
author | Mark Nunberg <mnunberg@haskalah.org> | 2018-03-05 11:57:22 +0200 |
---|---|---|
committer | Mark Nunberg <mnunberg@haskalah.org> | 2018-09-25 20:21:40 -0400 |
commit | 5e6bbf8c6075ce6406d424e7ed031c7a6c676fb2 (patch) | |
tree | cd16f361df7bf63207550a8098692fd0d9313316 | |
parent | 49974c9359ad6b58cea15106cf6511bdb31d31a9 (diff) |
saddr should be addrlen bytes
Not sizeof saddr.
-rw-r--r-- | net.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -402,7 +402,7 @@ addrretry: if (c->saddr) { free(c->saddr); } - c->saddr = malloc(sizeof(*p->ai_addr)); + c->saddr = malloc(p->ai_addrlen); memcpy(c->saddr, p->ai_addr, p->ai_addrlen); c->addrlen = p->ai_addrlen; |