On 08/30/2011 09:51 AM, Amos Jeffries wrote:

> +        if (IsIPv6())
> +            memcpy(buf,"::\0", min(static_cast<unsigned int>(3),blen));
> +        else if (IsIPv4())
> +            memcpy(buf,"0.0.0.0\0", min(static_cast<unsigned int>(8),blen));

There should be no reason to put a second 0-terminator into a
"guaranteed to be 0-terminated" string constant.

Cheers,

Alex.

Reply via email to