/* For this to work, printbuffer must be larger than
* anything we ever want to print.
*/
/* For this to work, printbuffer must be larger than
* anything we ever want to print.
*/
- i = vsprintf(printbuffer, fmt, args);
+ i = vscnprintf(printbuffer, sizeof(printbuffer), fmt, args);
/* For this to work, printbuffer must be larger than
* anything we ever want to print.
*/
/* For this to work, printbuffer must be larger than
* anything we ever want to print.
*/
- i = vsprintf(printbuffer, fmt, args);
+ i = vscnprintf(printbuffer, sizeof(printbuffer), fmt, args);
#define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_PRE_CON_BUF_SZ)
static void pre_console_putc(const char c)
{
#define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_PRE_CON_BUF_SZ)
static void pre_console_putc(const char c)
{
#else
static inline void pre_console_putc(const char c) {}
static inline void pre_console_puts(const char *s) {}
#else
static inline void pre_console_putc(const char c) {}
static inline void pre_console_puts(const char *s) {}
/* For this to work, printbuffer must be larger than
* anything we ever want to print.
*/
/* For this to work, printbuffer must be larger than
* anything we ever want to print.
*/
- i = vsprintf(printbuffer, fmt, args);
+ i = vscnprintf(printbuffer, sizeof(printbuffer), fmt, args);
/* For this to work, printbuffer must be larger than
* anything we ever want to print.
*/
/* For this to work, printbuffer must be larger than
* anything we ever want to print.
*/
- i = vsprintf(printbuffer, fmt, args);
+ i = vscnprintf(printbuffer, sizeof(printbuffer), fmt, args);
/* For this to work, printbuffer must be larger than
* anything we ever want to print.
*/
/* For this to work, printbuffer must be larger than
* anything we ever want to print.
*/
- i = vsprintf(printbuffer, fmt, args);
+ i = vsnprintf(printbuffer, sizeof(printbuffer), fmt, args);