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

Comparing ircd-hybrid/trunk/src/server.c (file contents):
Revision 3449 by michael, Thu May 1 19:14:42 2014 UTC vs.
Revision 3451 by michael, Thu May 1 19:19:56 2014 UTC

# Line 340 | Line 340 | try_connections(void *unused)
340   int
341   valid_servname(const char *name)
342   {
343 <  unsigned int length = 0;
344 <  unsigned int dots   = 0;
343 >  unsigned int dots = 0;
344    const char *p = name;
345  
346    for (; *p; ++p)
# Line 349 | Line 348 | valid_servname(const char *name)
348      if (!IsServChar(*p))
349        return 0;
350  
352    ++length;
353
351      if (*p == '.')
352        ++dots;
353    }
354  
355 <  return dots && length <= HOSTLEN;
355 >  return dots && (p - name) <= HOSTLEN;
356   }
357  
358   int

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)