safec  3.0
Safe C Library - ISO TR24731 Bounds Checking Interface
memzero_s.c File Reference
#include "safe_mem_lib.h"
+ Include dependency graph for memzero_s.c:

Functions

EXPORT errno_t memzero_s (void *dest, rsize_t len)
 Zeros len bytes starting at dest. More...
 

Function Documentation

◆ memzero_s()

EXPORT errno_t memzero_s ( void *  dest,
rsize_t  len 
)

Zeros len bytes starting at dest.

Remarks
EXTENSION TO ISO/IEC JTC1 SC22 WG14 N1172, Programming languages, environments and system software interfaces, Extensions to the C Library, Part I: Bounds-checking interfaces
Parameters
[out]destpointer to memory to be zeroed.
[in]lennumber of bytes to be zeroed
Precondition
dest shall not be a null pointer.
len shall not be 0 nor greater than RSIZE_MAX_MEM.
Returns
If there is a runtime constraint, the operation is not performed.
Return values
EOKwhen operation is successful
ESNULLPwhen dest is NULL POINTER
ESZEROLwhen len = ZERO
ESLEMAXwhen len > RSIZE_MAX_MEM
See also
memzero16_s(), memzero32_s()