1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-17 05:11:21 +03:00

libio: Convert __vswprintf_internal to buffers (bug 27857)

Always null-terminate the buffer and set E2BIG if the buffer is too
small.  This fixes bug 27857.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Florian Weimer
2022-12-19 18:56:55 +01:00
parent 5365acc567
commit 118816de33
6 changed files with 57 additions and 89 deletions

View File

@@ -196,6 +196,7 @@ bool __printf_buffer_flush (struct __printf_buffer *buf) attribute_hidden;
enum __wprintf_buffer_mode
{
__wprintf_buffer_mode_failed,
__wprintf_buffer_mode_swprintf,
__wprintf_buffer_mode_to_file,
};