safec 3.9
Safe C Library - ISO TR24731 Bounds Checking Interface
Loading...
Searching...
No Matches
safe_str_constraint.h File Reference
#include "safe_str_lib.h"
+ Include dependency graph for safe_str_constraint.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)
 

Function Documentation

◆ invoke_safe_str_constraint_handler()

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

Parameters
*msgPointer to the message describing the error.
*ptrPointer to aassociated data. Can be NULL.
errorThe error code encountered.

◆ handle_error()

static void handle_error ( char *restrict dest,
const rsize_t dmax,
const char *restrict err_msg,
errno_t err_code )
inlinestatic

◆ handle_werror()

static void handle_werror ( wchar_t *restrict dest,
const rsize_t dmax,
const char * err_msg,
errno_t err_code )
inlinestatic

◆ handle_str_bos_overflow()

int handle_str_bos_overflow ( const char *restrict msg,
char *restrict dest,
const rsize_t dmax )

◆ handle_str_bos_chk_warn()

void handle_str_bos_chk_warn ( const char *restrict func,
char *restrict dest,
const rsize_t dmax,
const size_t destbos )

◆ handle_str_src_bos_chk_warn()

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 )