httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <Martin.Krae...@mch.sni.de>
Subject [PATCH] Minor off-by-one error
Date Fri, 07 Nov 1997 16:28:37 GMT
You might want to re-check this:

>   ports=strchr(ips, ':');
>   if (ports != NULL)
>   {
>       if (ports == ips) return "Missing IP address";
>       else if (ports[0] == '\0')
>>>                   ^^^This should be [0], right?
>>>                      Otherwise the if() is never executed.
>           return "Address must end in :<port-number>";
>       *(ports++) = '\0';
>   } else
>       ports = ips;

A patch is appended.

    Martin
-- 
| S I E M E N S |  <Martin.Kraemer@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Mime
View raw message