diff options
author | tedu <> | 2015-01-17 18:01:43 +0000 |
---|---|---|
committer | tedu <> | 2015-01-17 18:01:43 +0000 |
commit | f1a5194b172185541e9828a950d827914e7679bd (patch) | |
tree | ca393e8dedc83846f35b70fcbf4c674f3b62fd6c /src | |
parent | 80f43df39326456df6d10fd599a8e439efdf16f1 (diff) | |
download | openbsd-f1a5194b172185541e9828a950d827914e7679bd.tar.gz openbsd-f1a5194b172185541e9828a950d827914e7679bd.tar.bz2 openbsd-f1a5194b172185541e9828a950d827914e7679bd.zip |
Improve wording in alloca.
1. it's not a bug; it's a caveat.
2. "slightly unsafe" gives me the willies.
3. one .Xr to malloc should suffice
ok deraadt jmc
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libc/stdlib/alloca.3 | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/libc/stdlib/alloca.3 b/src/lib/libc/stdlib/alloca.3 index 47e9b97143..5252ba586f 100644 --- a/src/lib/libc/stdlib/alloca.3 +++ b/src/lib/libc/stdlib/alloca.3 | |||
@@ -25,9 +25,9 @@ | |||
25 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 25 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
26 | .\" SUCH DAMAGE. | 26 | .\" SUCH DAMAGE. |
27 | .\" | 27 | .\" |
28 | .\" $OpenBSD: alloca.3,v 1.13 2013/06/05 03:39:23 tedu Exp $ | 28 | .\" $OpenBSD: alloca.3,v 1.14 2015/01/17 18:01:43 tedu Exp $ |
29 | .\" | 29 | .\" |
30 | .Dd $Mdocdate: June 5 2013 $ | 30 | .Dd $Mdocdate: January 17 2015 $ |
31 | .Dt ALLOCA 3 | 31 | .Dt ALLOCA 3 |
32 | .Os | 32 | .Os |
33 | .Sh NAME | 33 | .Sh NAME |
@@ -51,9 +51,7 @@ function returns a pointer to the beginning of the allocated space. | |||
51 | .Sh SEE ALSO | 51 | .Sh SEE ALSO |
52 | .Xr pagesize 1 , | 52 | .Xr pagesize 1 , |
53 | .Xr brk 2 , | 53 | .Xr brk 2 , |
54 | .Xr calloc 3 , | 54 | .Xr malloc 3 |
55 | .Xr malloc 3 , | ||
56 | .Xr realloc 3 | ||
57 | .\" .Sh HISTORY | 55 | .\" .Sh HISTORY |
58 | .\" The | 56 | .\" The |
59 | .\" .Fn alloca | 57 | .\" .Fn alloca |
@@ -62,10 +60,10 @@ function returns a pointer to the beginning of the allocated space. | |||
62 | .\" The function appeared in 32v, pwb and pwb.2 and in 3bsd 4bsd | 60 | .\" The function appeared in 32v, pwb and pwb.2 and in 3bsd 4bsd |
63 | .\" The first man page (or link to a man page that I can find at the | 61 | .\" The first man page (or link to a man page that I can find at the |
64 | .\" moment is 4.3... | 62 | .\" moment is 4.3... |
65 | .Sh BUGS | 63 | .Sh CAVEATS |
66 | The | 64 | The |
67 | .Fn alloca | 65 | .Fn alloca |
68 | function is slightly unsafe because it cannot ensure that the pointer | 66 | function is unsafe because it cannot ensure that the pointer |
69 | returned points to a valid and usable block of memory. | 67 | returned points to a valid and usable block of memory. |
70 | The allocation made may exceed the bounds of the stack, or even go | 68 | The allocation made may exceed the bounds of the stack, or even go |
71 | further into other objects in memory, and | 69 | further into other objects in memory, and |