bug in 3.2 configure

Herb Lewis hlewis at panasas.com
Wed Jul 2 01:47:08 GMT 2008


It is supposed to be MAXPATH size.

Reading configure a little closer, it looks like we are testing if
realpath allows a NULL argument.

Still seems like a bad test if it causes a core dump. Why do we care
if we can use a NULL?

Andrew Bartlett wrote:
> On Tue, 2008-07-01 at 18:32 -0700, Herb Lewis wrote:
> 
>>The test for realpath is incorrect and causes a core dump at
>>least on FreeBSD and maybe others as well.
>>
>>The following test program is used. The second argument
>>cannot be a NULL (this is what is causing the core).
>>
>>#include <stdio.h>
>>#include <limits.h>
>>main() {
>>         char *newpath = realpath("/tmp", NULL);
>>         exit ((newpath != NULL) ? 0 : 1);
>>}
>>
>>Both Linux and FreeBSD show the proto for realpath to be
>>
>>char *realpath(const char *path, char *resolved_path);
> 
> 
> What is the required allocation size of resolved_path?
> 
> Andrew Bartlett
> 


More information about the samba-technical mailing list