You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Guenter Knauf <fu...@apache.org> on 2013/02/07 16:38:19 UTC

Re: Potential NULL pointer deference in module/arch/netware/mod_nw_ssl.c

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.