mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-11-29 18:37:41 +08:00
9697f95b8f
This reverts commit 15d999759e
.
25 lines
458 B
C
25 lines
458 B
C
#include "StdAfx.h"
|
|
#ifdef __STDC_WANT_SECURE_LIB__
|
|
#include <stdarg.h>
|
|
|
|
int tls_secure_snprintf(char *buf, size_t size, const char *fmt, ...)
|
|
{
|
|
va_list ap;
|
|
int ret;
|
|
|
|
va_start(ap, fmt);
|
|
ret = _vsnprintf_s(buf, size, size, fmt, ap);
|
|
va_end(ap);
|
|
return (ret);
|
|
}
|
|
|
|
int tls_secure_vsnprintf(char *buf, size_t size, const char *fmt, va_list ap)
|
|
{
|
|
int ret;
|
|
|
|
ret = _vsnprintf_s(buf, size, size, fmt, ap);
|
|
return (ret);
|
|
}
|
|
|
|
#endif
|