diff options
author | Daniel Norman <danielnorman@google.com> | 2020-09-18 18:52:53 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-09-18 18:52:53 +0000 |
commit | dcdcb3fa15004669823a3a118189d9d72ff30852 (patch) | |
tree | 658b91620bb0b1bf39b05837c115abd3ef5ee060 /libc/stdio/stdio.cpp | |
parent | 3cc1ed13354d755b8a6034a38633d9043c4d108a (diff) | |
parent | 8f54e90a8123934ba65d8d867f9f50a41db59289 (diff) |
Merge "Merge SP1A.200727.001" into s-keystone-qcom-dev
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; } |