31 #include "safe_str_lib.h" 32 #include "safe_str_constraint.h" 74 int snprintf_s(
char * restrict dest, rsize_t dmax,
const char * restrict fmt, ...)
78 if (dmax > RSIZE_MAX_STR) {
81 return RCNEGATE(ESLEMAX);
87 return RCNEGATE(ESNULLP);
93 return RCNEGATE(ESNULLP);
99 return RCNEGATE(ESZEROL);
104 ret = vsnprintf(dest, (
size_t)dmax, fmt, ap);
int snprintf_s(char *restrict dest, rsize_t dmax, const char *restrict fmt,...)
The snprintf_s function composes a string with same test that would be printed if format was used on ...
void invoke_safe_str_constraint_handler(const char *msg, void *ptr, errno_t error)
Invokes the currently set constraint handler or the default.