safec 3.9
Safe C Library - ISO TR24731 Bounds Checking Interface
|
#include "safe_str_lib.h"
Functions | |
EXTERN void | invoke_safe_str_constraint_handler (const char *restrict msg, void *restrict ptr, errno_t error) |
Invokes the currently set thread-safe or not constraint handler or the default. | |
static void | handle_error (char *restrict dest, const rsize_t dmax, const char *restrict err_msg, errno_t err_code) |
static void | handle_werror (wchar_t *restrict dest, const rsize_t dmax, const char *err_msg, errno_t err_code) |
int | handle_str_bos_overflow (const char *restrict msg, char *restrict dest, const rsize_t dmax) |
void | handle_str_bos_chk_warn (const char *restrict func, char *restrict dest, const rsize_t dmax, const size_t destbos) |
void | handle_str_src_bos_chk_warn (const char *restrict func, char *restrict dest, const rsize_t smax, const size_t srcbos, const char *srcname, const char *smaxname) |
EXTERN void invoke_safe_str_constraint_handler | ( | const char *restrict | msg, |
void *restrict | ptr, | ||
errno_t | error ) |
Invokes the currently set thread-safe or not constraint handler or the default.
Can be disabled via --disable-constraint-handler
*msg | Pointer to the message describing the error. |
*ptr | Pointer to aassociated data. Can be NULL. |
error | The error code encountered. |
|
inlinestatic |
|
inlinestatic |
int handle_str_bos_overflow | ( | const char *restrict | msg, |
char *restrict | dest, | ||
const rsize_t | dmax ) |
void handle_str_bos_chk_warn | ( | const char *restrict | func, |
char *restrict | dest, | ||
const rsize_t | dmax, | ||
const size_t | destbos ) |
void handle_str_src_bos_chk_warn | ( | const char *restrict | func, |
char *restrict | dest, | ||
const rsize_t | smax, | ||
const size_t | srcbos, | ||
const char * | srcname, | ||
const char * | smaxname ) |