libssp: fix FORTIFY_SOURCE stub declarations

The LSB 4.1 that I referenced omitted the varargs, and I failed to catch it.
The __vsnprintf_chk error was from just downright misreading the page. GCC6
caught all of these, but I had only tested GCC4.2.

X-MFC-With:	r356356
This commit is contained in:
kevans 2020-01-04 22:05:00 +00:00
parent 9dec5821df
commit d5eb945ec7

View File

@ -38,15 +38,15 @@ void *__memcpy_chk(void *dst, const void *src, size_t len,
size_t dstlen); size_t dstlen);
void *__memset_chk(void *dst, int c, size_t len, size_t dstlen); void *__memset_chk(void *dst, int c, size_t len, size_t dstlen);
int __snprintf_chk(char *str, size_t maxlen, int flag, size_t strlen, int __snprintf_chk(char *str, size_t maxlen, int flag, size_t strlen,
const char *fmt); const char *fmt, ...);
int __sprintf_chk(char *str, int flag, size_t strlen, const char *fmt); int __sprintf_chk(char *str, int flag, size_t strlen, const char *fmt, ...);
char *__stpcpy_chk(char *dst, const char *src, size_t dstlen); char *__stpcpy_chk(char *dst, const char *src, size_t dstlen);
char *__strcat_chk(char *dst, const char *src, size_t dstlen); char *__strcat_chk(char *dst, const char *src, size_t dstlen);
char *__strcpy_chk(char *dst, const char *src, size_t dstlen); char *__strcpy_chk(char *dst, const char *src, size_t dstlen);
char *__strncat_chk(char *dst, const char *src, size_t len, size_t dstlen); char *__strncat_chk(char *dst, const char *src, size_t len, size_t dstlen);
char *__strncpy_chk(char *dst, const char *src, size_t len, size_t dstlen); char *__strncpy_chk(char *dst, const char *src, size_t len, size_t dstlen);
int __vsnprintf_chk(char *str, size_t size, const char *format, int __vsnprintf_chk(char *str, size_t size, int flags, size_t len,
va_list ap); const char *format, va_list ap);
int __vsprintf_chk(char *str, int flag, size_t slen, const char *format, int __vsprintf_chk(char *str, int flag, size_t slen, const char *format,
va_list ap); va_list ap);
@ -69,14 +69,14 @@ __memset_chk(void *dst, int c, size_t len, size_t dstlen)
int int
__snprintf_chk(char *str, size_t maxlen, int flag, size_t strlen, __snprintf_chk(char *str, size_t maxlen, int flag, size_t strlen,
const char *fmt) const char *fmt, ...)
{ {
ABORT(); ABORT();
} }
int int
__sprintf_chk(char *str, int flag, size_t strlen, const char *fmt) __sprintf_chk(char *str, int flag, size_t strlen, const char *fmt, ...)
{ {
ABORT(); ABORT();
@ -118,8 +118,8 @@ __strncpy_chk(char *dst, const char *src, size_t len, size_t dstlen)
} }
int int
__vsnprintf_chk(char *str, size_t size, const char *format, __vsnprintf_chk(char *str, size_t size, int flags, size_t len,
va_list ap) const char *format, va_list ap)
{ {
ABORT(); ABORT();