commit | 68ae6ad12e4f89526638f167c380d0b28b3bdeac | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Tue Jul 21 16:11:30 2020 -0700 |
committer | Elliott Hughes <enh@google.com> | Tue Jul 21 16:34:58 2020 -0700 |
tree | e18075751c1f0d08d94d7c6be14e1a18b560b285 | |
parent | c79ea239415963d4a38752d0f3efe50531c8e04f [diff] [blame] |
Changes for #inclusivefixit. Test: treehugger Change-Id: I7ff0496c5c2792a41781e74634247f55b0548213
diff --git a/libc/stdio/stdio.cpp b/libc/stdio/stdio.cpp index a0b4219..afc2c48 100644 --- a/libc/stdio/stdio.cpp +++ b/libc/stdio/stdio.cpp
@@ -1026,9 +1026,9 @@ __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; }