You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <Ma...@mch.sni.de> on 1997/11/07 17:28:37 UTC

[PATCH] Minor off-by-one error

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 |  <Ma...@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