cm_dns.c: getAFSServers() did not initialize the output
parameters before testing them when setting the
return value. It therefore returned success
when the network was unavailable. Bad Bad Bad.
DWORD i;
struct sockaddr_in vlSockAddr;
+ *numServers = 0;
+ *ttl = 0;
+
/* query the AFSDB records of cell */
if (DnsQuery_A(cellName, DNS_TYPE_AFSDB, DNS_QUERY_STANDARD, NULL, &pDnsCell, NULL) == ERROR_SUCCESS) {
memset((void*) &vlSockAddr, 0, sizeof(vlSockAddr));
- *numServers = 0;
- *ttl = 0;
-
/* go through the returned records */
for (pDnsIter = pDnsCell;pDnsIter; pDnsIter = pDnsIter->pNext) {
/* if we find an AFSDB record with Preference set to 1, we found a volserver */