33 #include "safeclib_private.h" 34 #include "safe_mem_constraint.h" 35 #include "mem_primitives_lib.h" 36 #include "safe_mem_lib.h" 83 #if !(defined(__STDC_WANT_LIB_EXT1__) && (__STDC_WANT_LIB_EXT1__ >= 1)) 85 memset_s (
void *dest, rsize_t dmax, uint8_t value, rsize_t n)
92 return (RCNEGATE(ESNULLP));
99 return (RCNEGATE(ESZEROL));
102 if (dmax > RSIZE_MAX_MEM) {
105 return (RCNEGATE(ESLEMAX));
108 if (n > RSIZE_MAX_MEM) {
124 return (RCNEGATE(err));
void mem_prim_set(void *dest, uint32_t len, uint8_t value)
Sets len bytes starting at dest to the specified value.
errno_t memset_s(void *dest, rsize_t dmax, uint8_t value, rsize_t n)
Sets the first n bytes starting at dest to the specified value, but maximal dmax bytes.
void invoke_safe_mem_constraint_handler(const char *msg, void *ptr, errno_t error)
Invokes the currently set constraint handler or the default.