ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/firedns.c
(Generate patch)

Comparing hopm/trunk/src/firedns.c (file contents):
Revision 5096 by michael, Tue Dec 23 19:59:18 2014 UTC vs.
Revision 5097 by michael, Tue Dec 23 20:57:35 2014 UTC

# Line 319 | Line 319 | int firedns_getip(int type, const char *
319  
320     s->class = 1;
321     s->type = type;
322 <   strncpy(s->lookup, name, 256);
322 >   strlcpy(s->lookup, name, sizeof(s->lookup));
323     s->info = info;
324    
325     if(fdns_fdinuse >= OptionsItem->dns_fdlimit)
# Line 597 | Line 597 | struct firedns_result *firedns_getresult
597  
598     l = recv(c->fd,&h,sizeof(struct s_header),0);
599     result.info = (void *) c->info;
600 <   strncpy(result.lookup, c->lookup, 256);
600 >   strlcpy(result.lookup, c->lookup, sizeof(result.lookup));
601  
602     if(l == -1)
603     {
# Line 756 | Line 756 | void firedns_cycle(void)
756  
757           memset(new_result.text, 0, sizeof(new_result.text));
758           new_result.info = p->info;
759 <         strncpy(new_result.lookup, p->lookup, 256);
759 >         strlcpy(new_result.lookup, p->lookup, sizeof(new_result.lookup));
760  
761           close(p->fd);
762           fdns_fdinuse--;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines