diff options
author | Elliott Hughes <enh@google.com> | 2020-07-22 20:25:48 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-07-22 20:25:48 +0000 |
commit | 277cc71cf3829cca55371b0b715eade1fd7b4498 (patch) | |
tree | e9a2fedf55835052b36beaf2fc40a98d2eccc8a5 /libc/stdio/stdio.cpp | |
parent | f5654b2c4fcf8f656c98b7a5f2fb68583e629450 (diff) | |
parent | f6ae693ce49f693060b12dfe5f7cf27fc2de12d2 (diff) |
Merge "Changes for #inclusivefixit." am: 6ba173a3f6 am: 9dd53b1a3a am: d9f0d8382a am: f6ae693ce4
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1369397
Change-Id: I2899d5d768d8dbf5bb31bd9f414b548c7c64c521
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; } |