summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authoryamt <yamt@NetBSD.org>2002-08-10 16:55:18 +0000
committeryamt <yamt@NetBSD.org>2002-08-10 16:55:18 +0000
commit120c9b325602136ca453e07dd35a3e2fa1297840 (patch)
treeb4131f45f351696030d708e53b4860446fe7d51f /lib/libc/stdlib
parent14e693f16befa91383887d937c7a263cc18447d1 (diff)
note that alloca can't report error.
from OpenBSD.
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/alloca.316
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/libc/stdlib/alloca.3 b/lib/libc/stdlib/alloca.3
index 93186ca6c39..0d8b8638175 100644
--- a/lib/libc/stdlib/alloca.3
+++ b/lib/libc/stdlib/alloca.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: alloca.3,v 1.9 2002/02/07 07:00:27 ross Exp $
+.\" $NetBSD: alloca.3,v 1.10 2002/08/10 16:55:18 yamt Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" from: @(#)alloca.3 8.1 (Berkeley) 6/4/93
.\"
-.Dd June 4, 1993
+.Dd August 11, 2002
.Dt ALLOCA 3
.Os
.Sh NAME
@@ -72,6 +72,18 @@ The
.Fn alloca
function
is machine dependent; its use is discouraged.
+.Pp
+The
+.Fn alloca
+function is slightly unsafe because it cannot ensure that the pointer
+returned points to a valid and usable block of memory.
+The allocation made may exceed the bounds of the stack, or even go
+further into other objects in memory, and
+.Fn alloca
+cannot determine such an error.
+Avoid
+.Fn alloca
+with large unbounded allocations.
.\" .Sh HISTORY
.\" The
.\" .Fn alloca