diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-12-06 04:21:28 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-12-06 04:21:28 +0000 |
commit | b5a42d4245f0489ded894803b745670431226d08 (patch) | |
tree | 531526e387dabadb04dee3e4f485c5a6c9afd8cc /lib/libc/stdlib | |
parent | 8023af13dd5ebb30fcce296dd0e9f2e544af37cf (diff) |
alloca cannot check if the allocation is valid. mention the consequences; millert ok
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r-- | lib/libc/stdlib/alloca.3 | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/libc/stdlib/alloca.3 b/lib/libc/stdlib/alloca.3 index e9e0b67ee32..431443a6e65 100644 --- a/lib/libc/stdlib/alloca.3 +++ b/lib/libc/stdlib/alloca.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: alloca.3,v 1.8 2000/04/20 13:50:01 aaron Exp $ +.\" $OpenBSD: alloca.3,v 1.9 2001/12/06 04:21:27 deraadt Exp $ .\" .Dd May 2, 1991 .Dt ALLOCA 3 @@ -70,3 +70,15 @@ function is machine dependent; its use is discouraged. .\" The function appeared in 32v, pwb and pwb.2 and in 3bsd 4bsd .\" The first man page (or link to a man page that I can find at the .\" moment is 4.3... +.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. |