From 767b28537a01c8dd0171a8f8fc2f817104028366 Mon Sep 17 00:00:00 2001 From: Evan Lojewski Date: Sat, 24 Oct 2020 08:25:59 -0600 Subject: builds: Add Microsoft's SDL and banned API list (#148) --- libs/printf/printf.c | 9 --------- libs/printf/printf.h | 11 ----------- 2 files changed, 20 deletions(-) (limited to 'libs') diff --git a/libs/printf/printf.c b/libs/printf/printf.c index 6217c26..b37ce1f 100644 --- a/libs/printf/printf.c +++ b/libs/printf/printf.c @@ -1007,15 +1007,6 @@ int printf_(const char *format, ...) return ret; } -int sprintf_(char *buffer, const char *format, ...) -{ - va_list va; - va_start(va, format); - const int ret = _vsnprintf(_out_buffer, buffer, (size_t)-1, format, va); - va_end(va); - return ret; -} - int snprintf_(char *buffer, size_t count, const char *format, ...) { va_list va; diff --git a/libs/printf/printf.h b/libs/printf/printf.h index de72d5c..4fc0ae8 100644 --- a/libs/printf/printf.h +++ b/libs/printf/printf.h @@ -62,17 +62,6 @@ void _putchar(char character); int printf_(const char* format, ...); -/** - * Tiny sprintf implementation - * Due to security reasons (buffer overflow) YOU SHOULD CONSIDER USING (V)SNPRINTF INSTEAD! - * \param buffer A pointer to the buffer where to store the formatted string. MUST be big enough to store the output! - * \param format A string that specifies the format of the output - * \return The number of characters that are WRITTEN into the buffer, not counting the terminating null character - */ -#define sprintf sprintf_ //lint !e828 -int sprintf_(char* buffer, const char* format, ...); - - /** * Tiny snprintf/vsnprintf implementation * \param buffer A pointer to the buffer where to store the formatted string -- cgit v1.2.1