This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/1963] argument p not checked in io/fts.c:fts_load()
- From: "heiko dot nardmann at secunet dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 2 Dec 2005 09:26:57 -0000
- Subject: [Bug libc/1963] argument p not checked in io/fts.c:fts_load()
- References: <20051201163208.1963.heiko.nardmann@secunet.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From heiko dot nardmann at secunet dot com 2005-12-02 09:26 -------
(In reply to comment #11)
> Please stop reopening this bug. Checking all arguments of all functions
> for invalid values would be extremely time consuming and no standard really
> requires it.
As far as 'time consuming' is concerned I do not agree on this. A sequence of
(i386 asm) tst and jne or something like this adds only a small overhead. Okay,
if this is policy then we add those checks only internally to our glibc
version. Stability is our focus.
> If you supply invalid arguments, you get undefined behaviour,
> sometimes (especially if the function is implemented just as a syscall)
> you can get -1/EFAULT or something similar, but the standards don't guarantee
> it and you can't rely on it.
> Only if the standard covering the function says that say NULL or some
> other special value is allowed for an argument, then it needs to be handled,
> according to the standard.
>
You also did not say something about the wrong return code of fts_set()? Is the
man page wrong or the source? According to my google results it seems to be the
source code. Other man pages also state that -1 has to be returned.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=1963
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.