summaryrefslogtreecommitdiff
path: root/libc/stdio/stdio.cpp
diff options
context:
space:
mode:
authorDaniel Norman <danielnorman@google.com>2020-08-31 12:05:53 -0700
committerScott Lobdell <slobdell@google.com>2020-09-01 11:05:29 -0700
commit8f54e90a8123934ba65d8d867f9f50a41db59289 (patch)
tree48f4a011a0fd1ed1b0fd6fd9735fccd50406a6f6 /libc/stdio/stdio.cpp
parent91e3f9941a7ab1961f34552ce85b62a59de2fe82 (diff)
parent41fdb7e615ad1240c98d153fd9b7910fb72db033 (diff)
Merge SP1A.200727.001
Change-Id: Iae7e5be602dbc976dea7cc572e65da2d507264ca
Diffstat (limited to 'libc/stdio/stdio.cpp')
-rw-r--r--libc/stdio/stdio.cpp4
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;
}