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

Functions

EXPORT errno_t memset32_s (uint32_t *dest, rsize_t dmax, uint32_t value, rsize_t n)
 Sets len uint32_t starting at dest to the specified value. More...
 

Function Documentation

◆ memset32_s()

EXPORT errno_t memset32_s ( uint32_t *  dest,
rsize_t  dmax,
uint32_t  value,
rsize_t  n 
)

Sets len uint32_t starting at dest to the specified value.

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 that will be set to the value
[in]dmaxmaximum number of bytes to be written
[in]valuebyte value to be written
[in]nnumber of 4-byte words to be set
Precondition
dest shall not be a null pointer.
dmax shall not be 0
dmax shall not be greater than RSIZE_MAX_MEM.
n shall not be greater than RSIZE_MAX_MEM32.
dmax*4 may not be smaller than n.
Returns
If there is a runtime-constraints violation, and if dest is not a null pointer, and if dmax is not larger than RSIZE_MAX_MEM, then, before reporting the runtime-constraints violation, memset32_s() copies dmax bytes to the destination.
Return values
EOKwhen operation is successful
ESNULLPwhen dest is NULL POINTER
ESZEROLOnly before C11 when n = ZERO
ESLEMAXwhen dmax > RSIZE_MAX_MEM
ESLEMAXwhen n > RSIZE_MAX_MEM32
ESNOSPCwhen dmax/4 < n
See also
memset_s(), memset16_s()