Synopsis
errno_t memcpy_s(void *restrict s1,
                 rsize_t s1max,
                 const void *restrict s2,
                 rsize_t n);
Description

memcpy_s copies n characters from the object pointed to by s2 into the object pointed to by s1 whose size is supplied in s1max. The parameters are checked for null pointer and overlapping cases. On error memcpy_s stores zeroes in the first s1max characters and the current constraint_handler is called.

memcpy_s returns 0 on success and non-zero on failure.