Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
908 B

.TH fmt_strm_alloca 3
fmt_strm_alloca \- write multiple ASCII strings
.B #include <libowfat/fmt.h>
char* \fBfmt_strm_alloca\fP(const char *\fIsource\fR, ...);
fmt_strm_alloca copies all leading nonzero bytes from \fIsource\fR and
following function arguments to a freshly allocated stack buffer and
returns a pointer to it.
Unlink fmt_strm, fmt_strm_alloca does append \\0.
Warning: Using variable size stack buffers is dangerous. If the size of
the buffer is larger than the hardware page size, then it can be used to
skip over the guard page and cause memory corruption. fmt_strm_alloca
has a built-in limit of 100000 bytes. Use this only for trivially small
If the strings do not come from a trusted place or you are not sure they
are small, prefer fmt_strm_malloc instead.
fmt_str(3), fmt_strm(3), fmt_strm_malloc(3), alloca(3), strcpy(3)