]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix idle struct addrinfo definition.
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 15 Oct 2010 09:44:20 +0000 (22:44 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 15 Oct 2010 09:44:20 +0000 (22:44 +1300)
ai_addrlen is defined formally as socklen_t not size_t. This could have
caused problems if the idle version were ever used.

Found during investigation of bug 3057 by "Anonymous".

compat/getaddrinfo.h

index 96e42aaf8603ff3b8544d779b94f32707355b2f7..ea62a0114f883672e05bca638ea3837404a38ffc 100644 (file)
@@ -58,7 +58,7 @@ struct addrinfo {
     int ai_family;             /* PF_xxx */
     int ai_socktype;           /* SOCK_xxx */
     int ai_protocol;           /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
-    size_t ai_addrlen;         /* length of ai_addr */
+    socklen_t ai_addrlen;      /* length of ai_addr */
     char *ai_canonname;                /* canonical name for nodename */
     struct sockaddr *ai_addr;  /* binary address */
     struct addrinfo *ai_next;  /* next structure in linked list */