MCPcopy Create free account
hub / github.com/acl-dev/acl / safe_vsnprintf

Function safe_vsnprintf

lib_acl_cpp/src/stdlib/snprintf.cpp:24–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24int safe_vsnprintf(char *buf, size_t size, const char *fmt, va_list ap)
25{
26 if (size == 0) {
27 buf[0] = 0;
28 return -1;
29 }
30
31 int ret = ::_vsnprintf_s(buf, size, _TRUNCATE, fmt, ap);
32 if (ret < 0) {
33 return -1;
34 } else {
35 return ret;
36 }
37}
38
39# else
40

Callers 1

safe_snprintfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…