diff options
author | Elliott Hughes <enh@google.com> | 2020-07-21 16:11:30 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2020-07-21 16:34:58 -0700 |
commit | 68ae6ad12e4f89526638f167c380d0b28b3bdeac (patch) | |
tree | e18075751c1f0d08d94d7c6be14e1a18b560b285 /libc/stdio/stdio.cpp | |
parent | c79ea239415963d4a38752d0f3efe50531c8e04f (diff) |
Changes for #inclusivefixit.
Test: treehugger
Change-Id: I7ff0496c5c2792a41781e74634247f55b0548213
Diffstat (limited to 'libc/stdio/stdio.cpp')
-rw-r--r-- | libc/stdio/stdio.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |