From 68ae6ad12e4f89526638f167c380d0b28b3bdeac Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 21 Jul 2020 16:11:30 -0700 Subject: Changes for #inclusivefixit. Test: treehugger Change-Id: I7ff0496c5c2792a41781e74634247f55b0548213 --- libc/stdio/stdio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/stdio/stdio.cpp') diff --git a/libc/stdio/stdio.cpp b/libc/stdio/stdio.cpp index a0b421923..afc2c4881 100644 --- a/libc/stdio/stdio.cpp +++ b/libc/stdio/stdio.cpp @@ -1026,9 +1026,9 @@ int vsnprintf(char* s, size_t n, const char* fmt, va_list ap) { __check_count("vsnprintf", "size", n); // Stdio internals do not deal correctly with zero length buffer. - char dummy; + char one_byte_buffer[1]; if (n == 0) { - s = &dummy; + s = one_byte_buffer; n = 1; } -- cgit v1.2.3