Initialize salen before calling getsockname
authorraghu <raghu>
Tue, 19 Apr 2005 22:07:41 +0000 (22:07 +0000)
committerraghu <raghu>
Tue, 19 Apr 2005 22:07:41 +0000 (22:07 +0000)
src/lib/radius.c

index 5cbe931..8652522 100644 (file)
@@ -266,6 +266,7 @@ static ssize_t rad_recvfrom(int sockfd, void *buf, size_t len, int flags,
         *      First, do a hokey hack to figure out which address
         *      family, address, and port the socket is listening on.
         */
+       salen = sizeof(salocal);
        if (getsockname(sockfd, (struct sockaddr *) &salocal,
                        &salen) < 0) return -1;