On 10/04/2009 03:40 PM, Graham Leggett wrote:
> Ruediger Pluem wrote:
>
>>> + if (!(filter.port_str && !filter.port_str[0])) {
>>> + /* NOTE: ap_port_of_scheme will return 0 if given NULL input
>>> */
>>> + const unsigned fport = filter.port_str ? filter.port
>>> + : apr_uri_port_of_scheme(filter.scheme);
>>> + const unsigned uport = (url.port_str && url.port_str[0])
>>> + ? url.port : apr_uri_port_of_scheme(url.scheme);
>> IMHO we cannot be sure that url.scheme != NULL here.
>
> apr_uri_port_of_scheme accepts a NULL parameter, what problem do you
> foresee here? Was it a potential segfault, or was it about the return
> port of 0?
The segfault, but as apr_uri_port_of_scheme accepts a NULL parameter this is
fine.
Regards
RĂ¼diger