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
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
System: NetBSD 6.99.28 NetBSD 6.99.28 (KVOTHE) #23: Fri Dec 27 
21:42:38 CET 2013 
Architecture: x86_64
Machine: amd64
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

The problem is that NetBSD currently just causes core dumps when
programs expect that behaviour to be supported.
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.
Implement support, please. Or at least catch NULL and return EINVAL
or similar.


Home | Main Index | Thread Index | Old Index