diff options
Diffstat (limited to 'src/lib/libc')
| -rw-r--r-- | src/lib/libc/stdlib/alloca.3 | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/alloca.3 b/src/lib/libc/stdlib/alloca.3 index e9e0b67ee3..431443a6e6 100644 --- a/src/lib/libc/stdlib/alloca.3 +++ b/src/lib/libc/stdlib/alloca.3 | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
| 31 | .\" | 31 | .\" |
| 32 | .\" $OpenBSD: alloca.3,v 1.8 2000/04/20 13:50:01 aaron Exp $ | 32 | .\" $OpenBSD: alloca.3,v 1.9 2001/12/06 04:21:27 deraadt Exp $ |
| 33 | .\" | 33 | .\" |
| 34 | .Dd May 2, 1991 | 34 | .Dd May 2, 1991 |
| 35 | .Dt ALLOCA 3 | 35 | .Dt ALLOCA 3 |
| @@ -70,3 +70,15 @@ function is machine dependent; its use is discouraged. | |||
| 70 | .\" The function appeared in 32v, pwb and pwb.2 and in 3bsd 4bsd | 70 | .\" The function appeared in 32v, pwb and pwb.2 and in 3bsd 4bsd |
| 71 | .\" The first man page (or link to a man page that I can find at the | 71 | .\" The first man page (or link to a man page that I can find at the |
| 72 | .\" moment is 4.3... | 72 | .\" moment is 4.3... |
| 73 | .Pp | ||
| 74 | The | ||
| 75 | .Fn alloca | ||
| 76 | function is slightly unsafe because it cannot ensure that the pointer | ||
| 77 | returned points to a valid and usable block of memory. | ||
| 78 | The allocation made may exceed the bounds of the stack, or even go | ||
| 79 | further into other objects in memory, and | ||
| 80 | .Fn alloca | ||
| 81 | cannot determine such an error. | ||
| 82 | Avoid | ||
| 83 | .Fn alloca | ||
| 84 | with large unbounded allocations. | ||
