34 #include "safe_str_lib.h" 35 #include "safe_str_constraint.h" 87 #include "safeclib_private.h" 88 #include "safe_str_constraint.h" 89 #include "safe_str_lib.h" 91 int vsprintf_s(
char *restrict dest, rsize_t dmax,
const char *restrict fmt, va_list ap)
95 if (dmax > RSIZE_MAX_STR) {
98 return RCNEGATE(ESLEMAX);
104 return RCNEGATE(ESNULLP);
110 return RCNEGATE(ESNULLP);
116 return RCNEGATE(ESZEROL);
119 ret = vsnprintf(dest, (
size_t)dmax, fmt, ap);
121 if (ret >= (
int)dmax) {
125 ret = RCNEGATE(ESNOSPC);
void invoke_safe_str_constraint_handler(const char *msg, void *ptr, errno_t error)
Invokes the currently set constraint handler or the default.
int vsprintf_s(char *restrict dest, rsize_t dmax, const char *restrict fmt, va_list ap)
The vsprintf_s function composes a string with same test that would be printed if format was used on ...