diff options
author | Elliott Hughes <enh@google.com> | 2020-07-22 19:26:37 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-07-22 19:26:37 +0000 |
commit | 6ba173a3f66341e06b8f90e60fd7eea25cb8da54 (patch) | |
tree | e9a2fedf55835052b36beaf2fc40a98d2eccc8a5 /libc/stdio/stdio.cpp | |
parent | 9b7338c6bbf58c0e3dfb35d1808d348ea08cf936 (diff) | |
parent | 68ae6ad12e4f89526638f167c380d0b28b3bdeac (diff) |
Merge "Changes for #inclusivefixit."
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; } |