diff options
author | 2005-11-12 15:57:30 +0000 | |
---|---|---|
committer | 2005-11-12 15:57:30 +0000 | |
commit | b65117118f0b3b68c7b7b64f3976b8e29678e4a8 (patch) | |
tree | d81b13fe6f1bf752203b79157e39ddca51549861 /lib/libc/gen/basename.3 | |
parent | use asprintf; ok dhill@mindcry.org (diff) | |
download | wireguard-openbsd-b65117118f0b3b68c7b7b64f3976b8e29678e4a8.tar.xz wireguard-openbsd-b65117118f0b3b68c7b7b64f3976b8e29678e4a8.zip |
- note that basename() may modify the string
- section header WARNING -> CAVEATS while here
from han boetes;
ok deraadt@
Diffstat (limited to 'lib/libc/gen/basename.3')
-rw-r--r-- | lib/libc/gen/basename.3 | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/libc/gen/basename.3 b/lib/libc/gen/basename.3 index 25dab2e046e..e3c4ddd2e2c 100644 --- a/lib/libc/gen/basename.3 +++ b/lib/libc/gen/basename.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: basename.3,v 1.18 2003/07/30 22:29:32 millert Exp $ +.\" $OpenBSD: basename.3,v 1.19 2005/11/12 15:57:30 jmc Exp $ .\" .\" Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> .\" @@ -63,10 +63,6 @@ The following error codes may be set in The path component to be returned was larger than .Dv MAXPATHLEN . .El -.Sh WARNINGS -.Fn basename -returns a pointer to internal static storage space that will be overwritten -by subsequent calls. .Sh SEE ALSO .Xr basename 1 , .Xr dirname 1 , @@ -83,3 +79,14 @@ function first appeared in .Ox 2.2 . .Sh AUTHORS .An Todd C. Miller +.Sh CAVEATS +.Fn basename +returns a pointer to internal static storage space that will be overwritten +by subsequent calls. +.Pp +Other vendor implementations of +.Fn basename +may modify the contents of the string passed to +.Fn basename ; +this should be taken into account when writing code which calls this function +if portability is desired. |