On 27 Feb 2002 [EMAIL PROTECTED] wrote:

>        /*  determine whether newline should be written */
>        if (add & SSL_NO_NEWLINE)
>   -        nstr[0] = NUL;
>   +        nstr = NUL;

How can that be right?

mod_ssl.h:#define NUL '\0'

So now nstr is a null pointer rather than an empty string (use NULL not
NUL, anyway) in this case.

>        else {
>   -        nstr[0] = '\n';
>   -        nstr[1] = NUL;
>   +        nstr = APR_EOL_STR;
>        }

And not a null pointer (a non-empty string) in the other case.

Won't you segfault in the null pointer case on the sprintf call later?

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA



Reply via email to