/*------------------------------------------------------------------ * test_memzero_s * * *= *------------------------------------------------------------------ */ #include "test_private.h" #include "safe_mem_lib.h" #define LEN ( 512 ) int test_memzero_s() { errno_t rc; uint32_t i; uint32_t len; uint8_t mem1[LEN]; /*--------------------------------------------------*/ rc = memzero_s(NULL, LEN); if (rc != ESNULLP) { debug_printf("%s %u Error rc=%u \n", __FUNCTION__, __LINE__, rc); } /*--------------------------------------------------*/ rc = memzero_s(mem1, 0); if (rc != ESZEROL) { debug_printf("%s %u Error rc=%u \n", __FUNCTION__, __LINE__, rc); } /*--------------------------------------------------*/ rc = memzero_s(mem1, RSIZE_MAX_MEM+1); if (rc != ESLEMAX) { debug_printf("%s %u Error rc=%u \n", __FUNCTION__, __LINE__, rc); } /*--------------------------------------------------*/ for (i=0; i