httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: cvs commit: httpd-2.0/modules/ssl mod_ssl.h ssl_engine_log.c
Date Wed, 27 Feb 2002 00:44:24 GMT
On 27 Feb 2002 rbb@apache.org 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
   cliffwoolley@yahoo.com
   Charlottesville, VA




Mime
View raw message