diff options
| author | Mattias Andrée <m@maandree.se> | 2026-02-28 19:17:45 +0100 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-02-28 19:17:45 +0100 |
| commit | 7c545b4b9c31dbfb2e8430aded030654a92e967a (patch) | |
| tree | cd79fb055bfcca79dee8b1b35c0ed59ea3a0c85a /README | |
| download | libabort-master.tar.gz libabort-master.tar.bz2 libabort-master.tar.xz | |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
| -rw-r--r-- | README | 48 |
1 files changed, 48 insertions, 0 deletions
@@ -0,0 +1,48 @@ +NAME + libabort - String functions that abort when getting out of bounds + +SYNOPSIS + #include <libabort.h> + + Link with -labort. + +DESCRIPTION + libabort provides string functions that call abort(3) rather than + silently truncating or read or write out of bounds. + + Each function is namespaced with the prefix libabort_, and shorthand + names are available without this prefix, however defining + LIBABORT_NO_SHORTHANDS before including <libabort.h> will cause these + shorthands not to be defined. + + The following functions are provided: + + libabort_stracpy(3) + Copy a NUL terminated string into a fixed-size buffer. + Returns the written string. + + libabort_stpacpy(3) + Copy a NUL terminated string into a fixed-size buffer. + Returns the end of the written string. + + libabort_stracat(3) + Append a NUL terminated string to a NUL terminated string within + a fixed-size buffer. Returns the augmented string. + + libabort_stpacat(3) + Append a NUL terminated string to a NUL terminated string within + a fixed-size buffer. Returns the end of the augmented string. + + libabort_stralen(3) + Compute the length of string that is expected to be NUL + terminated. + + libabort_saprintf(3) + Format a string into a fixed-size buffer. + + libabort_vsaprintf(3) + Format a string into a fixed-size buffer using a va_list + argument list. + +SEE ALSO + None. |
