httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guenter Knauf <fua...@apache.org>
Subject Re: Potential NULL pointer deference in module/arch/netware/mod_nw_ssl.c
Date Thu, 07 Feb 2013 15:38:19 GMT
Hi Christophe,
Am 25.01.2013 23:26, schrieb Christophe JAILLET:
> cppCheck complains about a potential NULL pointer deference in
> module/arch/netware/mod_nw_ssl.c
> In function 'ssl_io_filter_Upgrade' we have, line 1165 :
>
> if (r) {
> ...
> }
> else {
> ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(02131)
> ... ^_________
> }
>
> If we get here, r is NULL.
> Moreover, r-> has already been used before in the function. Should r be
> NULL, we would already have crashed.
>
> I'm not sure of the way to fix it and have no way to test it, so I just
> report it here for your attention.
>
> I think we should either:
> - rearrange the code in order to test for r==NULL at the beginning
> - just have an ASSERT at the beginning of the function
> - drop the 'if/else' if the else case can not happen
thanks for pointing this out. I've just committed a fix:
http://svn.apache.org/viewvc?rev=1443558&view=rev

Gün.



Mime
View raw message