NetBSD-Bugs archive

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

lib/46618: realpath(3) isn't SUSv4 compliant (and causes flactag 2.0.4 to dump core)



>Number:         46618
>Category:       lib
>Synopsis:       realpath(3) isn't SUSv4 compliant (and causes flactag 2.0.4 to 
>dump core)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 21 20:00:01 +0000 2012
>Originator:     Onno van der Linden
>Release:        NetBSD 6.99.7 i386
>Organization:
>Environment:
NetBSD sheep 6.99.7 NetBSD 6.99.7 (SHEEP) #9: Sat Jun 16 19:53:56 MEST 2012  
onno@sheep:/usr/src/sys/arch/i386/compile/SHEEP i386
>Description:
Latest flactag 2.0.4 release calls realpath with NULL as second argument.
DIAGASSERT in the NetBSD code of realpath will cause a coredump.

And from http://comments.gmane.org/gmane.os.openbsd.tech/26065
2 opengroup url's containing the old and new standard:

http://pubs.opengroup.org/onlinepubs/009695399/functions/realpath.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html


>How-To-Repeat:
#include <stdio.h>
main(int argc, char *argv[])
{
realpath(argv[0],NULL);
}
>Fix:
Implement the SUSv4 standard for realpath or document in the manpage which 
standard(s) apply to realpath(3).



Home | Main Index | Thread Index | Old Index