|
safec
2.1
Safe C Library - ISO TR24731 Bounds Checking Interface
|
#include "config.h"#include "safe_str_lib.h"#include "safe_str_constraint.h"#include <stdarg.h>#include "safeclib_private.h"
Include dependency graph for vsnprintf_s.c:Go to the source code of this file.
Functions | |
| int | vsnprintf_s (char *restrict dest, rsize_t dmax, const char *restrict fmt, va_list ap) |
| The vsnprintf_s function composes a string with same test that would be printed if format was used on printf. More... | |
| int vsnprintf_s | ( | char *restrict | dest, |
| rsize_t | dmax, | ||
| const char *restrict | fmt, | ||
| va_list | ap | ||
| ) |
The vsnprintf_s function composes a string with same test that would be printed if format was used on printf.
Instead of being printed, the content is stored in dest. Unlike the safe variant vsprintf_s, vsnprintf_s does not guarantees that the buffer will be null-terminated unless the buffer size is zero.
| [out] | dest | pointer to string that will be written into. |
| [in] | dmax | restricted maximum length of dest |
| [in] | fmt | format-control string. |
| [in] | ap | optional arguments |
| ESNULLP | when dest/fmt is NULL pointer |
| ESZEROL | when dmax = 0 |
| ESLEMAX | when dmax > RSIZE_MAX_STR |
| ESNOSPC | when return value exceeds dmax |
Definition at line 90 of file vsnprintf_s.c.