NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/48497: realpath() does not conform to POSIX 2008



>Number:         48497
>Category:       lib
>Synopsis:       realpath() does not conform to POSIX 2008
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 04 13:00:00 +0000 2014
>Originator:     Thomas Klausner
>Release:        NetBSD 6.99.28
>Organization:
Curiosity is the very basis of education and if you tell me that 
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
>Environment:
        
        
System: NetBSD yt.nih.at 6.99.28 NetBSD 6.99.28 (KVOTHE) #23: Fri Dec 27 
21:42:38 CET 2013 
wiz%yt.nih.at@localhost:/archive/foreign/src/sys/arch/amd64/compile/obj/KVOTHE 
amd64
Architecture: x86_64
Machine: amd64
>Description:
In the 2008 edition, realpath() was extended to allow NULL as second argument.
The description is:

"If resolved_name is a null pointer, the generated pathname shall
be stored as a null-terminated string in a buffer allocated as if
by a call to malloc()."

For details, see
http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html

The problem is that NetBSD currently just causes core dumps when
programs expect that behaviour to be supported.
>How-To-Repeat:
Compile code that passes NULL as second argument (like wip/notmuch
if compiled without one of the patches in that package) and see a
core dump.
>Fix:
Implement support, please. Or at least catch NULL and return EINVAL
or similar.

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index