ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-7.2/src/irc_res.c
(Generate patch)

Comparing ircd-hybrid-7.2/src/irc_res.c (file contents):
Revision 985 by michael, Sat Aug 15 20:31:54 2009 UTC vs.
Revision 986 by michael, Sat Aug 15 21:12:34 2009 UTC

# Line 92 | Line 92 | struct reslist
92   };
93  
94   static fde_t ResolverFileDescriptor;
95 < static dlink_list request_list    = { NULL, NULL, 0 };
95 > static dlink_list request_list = { NULL, NULL, 0 };
96  
97   static void rem_request(struct reslist *request);
98   static struct reslist *make_request(struct DNSQuery *query);
# Line 443 | Line 443 | do_query_name(struct DNSQuery *query, co
443   {
444    char host_name[HOSTLEN + 1];
445  
446 <  strlcpy(host_name, name, HOSTLEN);
447 <  add_local_domain(host_name, HOSTLEN);
446 >  strlcpy(host_name, name, HOSTLEN + 1);
447 >  add_local_domain(host_name, HOSTLEN + 1);
448  
449    if (request == NULL)
450    {
451      request       = make_request(query);
452 <    request->name = (char *)MyMalloc(strlen(host_name) + 1);
452 >    request->name = MyMalloc(strlen(host_name) + 1);
453      request->type = type;
454      strcpy(request->name, host_name);
455   #ifdef IPV6
# Line 514 | Line 514 | do_query_number(struct DNSQuery *query,
514      request       = make_request(query);
515      request->type = T_PTR;
516      memcpy(&request->addr, addr, sizeof(struct irc_ssaddr));
517 <    request->name = (char *)MyMalloc(HOSTLEN + 1);
517 >    request->name = MyMalloc(HOSTLEN + 1);
518    }
519  
520    query_name(ipbuf, C_IN, T_PTR, request);
# Line 696 | Line 696 | proc_answer(struct reslist *request, HEA
696          else if (n == 0)
697            return(0); /* no more answers left */
698  
699 <        strlcpy(request->name, hostbuf, HOSTLEN);
699 >        strlcpy(request->name, hostbuf, HOSTLEN + 1);
700  
701          return(1);
702          break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines