mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-18 05:53:36 +01:00
libc/stdio: Increase BUF in vfprintf.c and vfwprintf.c
With the %b format specifier we need enough space to write a uintmax_t in binary. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1400
This commit is contained in:
parent
df79daa0fd
commit
d4f9e32639
@ -291,13 +291,9 @@ vfprintf(FILE * __restrict fp, const char * __restrict fmt0, va_list ap)
|
||||
/*
|
||||
* The size of the buffer we use as scratch space for integer
|
||||
* conversions, among other things. We need enough space to
|
||||
* write a uintmax_t in octal (plus one byte).
|
||||
* write a uintmax_t in binary.
|
||||
*/
|
||||
#if UINTMAX_MAX <= UINT64_MAX
|
||||
#define BUF 32
|
||||
#else
|
||||
#error "BUF must be large enough to format a uintmax_t"
|
||||
#endif
|
||||
#define BUF (sizeof(uintmax_t) * CHAR_BIT)
|
||||
|
||||
/*
|
||||
* Non-MT-safe version
|
||||
|
@ -369,13 +369,9 @@ vfwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt0, va_list ap)
|
||||
/*
|
||||
* The size of the buffer we use as scratch space for integer
|
||||
* conversions, among other things. We need enough space to
|
||||
* write a uintmax_t in octal (plus one byte).
|
||||
* write a uintmax_t in binary.
|
||||
*/
|
||||
#if UINTMAX_MAX <= UINT64_MAX
|
||||
#define BUF 32
|
||||
#else
|
||||
#error "BUF must be large enough to format a uintmax_t"
|
||||
#endif
|
||||
#define BUF (sizeof(uintmax_t) * CHAR_BIT)
|
||||
|
||||
/*
|
||||
* Non-MT-safe version
|
||||
|
@ -512,7 +512,7 @@ putchar(int c, void *arg)
|
||||
if ((flags & TOTTY) && tp != NULL && !KERNEL_PANICKED())
|
||||
tty_putchar(tp, c);
|
||||
|
||||
if ((flags & TOCONS ) && cn_mute) {
|
||||
if ((flags & TOCONS) && cn_mute) {
|
||||
flags &= ~TOCONS;
|
||||
ap->flags = flags;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user