Commit 523c98f1 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Allocate an entire sockaddr_storage for backend address

entries, in order to guarantee type safety.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5474 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent db9f7a5e
......@@ -156,7 +156,7 @@ copy_sockaddr(struct sockaddr_storage **sa, socklen_t *len,
{
assert(*src > 0);
*sa = malloc(*src);
*sa = calloc(sizeof **sa, 1);
XXXAN(*sa);
memcpy(*sa, src + 1, *src);
*len = *src;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment