On 03/18/2019 01:22 PM, Eric Covener wrote:
> I just found that this is a compile error on my mac w/ maintainer mode
> due to __attribute__((nonnull))
> util.c:576:10: error: nonnull parameter 'name' will evaluate to 'true'
> on first encounter [-Werror,-Wpointer-bool-conversion]

Hm. I guess my RedHat 6 compiler is too old and no maintainer mode used. Hence 
I did not catch that.
So should we just revert r1855743 (unfortunately in 2.4.x then as well :-( ) 
and put the NULL checking
burden on the caller? I guess in the specific case here where it caused the 
segfault we are safe
as r1855744 catches that.

Regards

RĂ¼diger

> 
>     if (!name || !*name) {
> 
> On Mon, Mar 18, 2019 at 5:19 AM <[email protected]> wrote:
>>
>> Author: rpluem
>> Date: Mon Mar 18 09:19:54 2019
>> New Revision: 1855743
>>
>> URL: http://svn.apache.org/viewvc?rev=1855743&view=rev
>> Log:
>> * Play safe in case we get no name
>>
>> Modified:
>>     httpd/httpd/trunk/server/util.c
>>
>> Modified: httpd/httpd/trunk/server/util.c
>> URL: 
>> http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=1855743&r1=1855742&r2=1855743&view=diff
>> ==============================================================================
>> --- httpd/httpd/trunk/server/util.c (original)
>> +++ httpd/httpd/trunk/server/util.c Mon Mar 18 09:19:54 2019
>> @@ -573,6 +573,10 @@ AP_DECLARE(void) ap_no2slash_ex(char *na
>>
>>      char *d, *s;
>>
>> +    if (!name || !*name) {
>> +        return;
>> +    }
>> +
>>      s = d = name;
>>
>>  #ifdef HAVE_UNC_PATHS
>>
>>
> 
> 

Reply via email to