32 #include "safeclib_private.h" 33 #include "safe_mem_constraint.h" 34 #include "mem_primitives_lib.h" 35 #include "safe_mem_lib.h" 84 memmove_s (
void *dest, rsize_t dmax,
const void *src, rsize_t smax)
95 return (RCNEGATE(ESNULLP));
101 return (RCNEGATE(ESZEROL));
104 if (dmax > RSIZE_MAX_MEM || smax > RSIZE_MAX_MEM) {
107 return (RCNEGATE(ESLEMAX));
114 return (RCNEGATE(ESZEROL));
121 return (RCNEGATE(ESNOSPC));
128 return (RCNEGATE(ESNULLP));
136 return (RCNEGATE(EOK));
void mem_prim_set(void *dest, uint32_t len, uint8_t value)
Sets len bytes starting at dest to the specified value.
void mem_prim_move(void *dest, const void *src, uint32_t len)
Moves at most len of bytes from src to dest.
errno_t memmove_s(void *dest, rsize_t dmax, const void *src, rsize_t smax)
The memmove_s function copies smax bytes from the region pointed to by src into the region pointed to...
void invoke_safe_mem_constraint_handler(const char *msg, void *ptr, errno_t error)
Invokes the currently set constraint handler or the default.