llvm-project/libcxx
Dimitry Andric 52844c83d0 Ensure showbase does not overflow do_put buffers
Summary:
In https://bugs.freebsd.org/207918, Daniel McRobb describes how using
std::showbase with ostreams can cause truncation of unsigned long long
when output format is octal.  In fact, this can even happen with
unsigned int and unsigned long.

To ensure this does not happen, add one additional character to the
do_put buffers if std::showbase is on.  Also add a test case.

Reviewers: EricWF, mclow.lists

Reviewed By: EricWF

Subscribers: cfe-commits, emaste

Differential Revision: https://reviews.llvm.org/D32670

llvm-svn: 302362
2017-05-06 20:58:50 +00:00
..
benchmarks Emit benchmark tests into the benchmarks build directory, not lib/ 2017-04-18 07:40:22 +00:00
cmake [CMake][libcxx] Fix the --target and --gcc-toolchain flag handling 2017-04-16 02:25:55 +00:00
docs Add markup for libc++ dylib availability 2017-05-04 17:08:54 +00:00
include Ensure showbase does not overflow do_put buffers 2017-05-06 20:58:50 +00:00
lib Rename the static version of libc++ on Windows. 2017-04-20 04:19:02 +00:00
src Fix remaining GCC 7 build warnings 2017-05-05 20:39:03 +00:00
test Ensure showbase does not overflow do_put buffers 2017-05-06 20:58:50 +00:00
utils Add markup for libc++ dylib availability 2017-05-04 17:08:54 +00:00
www Mark LWG#2788 as complete - we already do this 2017-04-18 17:22:49 +00:00
.arcconfig Upgrade arcconfig to use https 2016-07-18 02:02:49 +00:00
.clang-format Make clang-format use C++03 syntax 2017-04-15 02:45:43 +00:00
.gitignore Implement N4606 optional 2016-10-12 07:46:20 +00:00
CMakeLists.txt test commit 2017-05-04 06:28:34 +00:00
CREDITS.TXT Updated email address in `CREDITS.txt`. 2017-03-06 20:46:55 +00:00
LICENSE.TXT Update year to 2017 2017-01-03 11:20:43 +00:00
NOTES.TXT Update doc and various cleanup 2016-12-23 20:00:13 +00:00
TODO.TXT Add list of filesystem NB comments to TODO.TXT so they can be tracked separately 2017-03-06 21:23:36 +00:00
appveyor.yml Change Appveyor to download Clang from llvm.org instead of my private server 2017-05-04 19:04:50 +00:00
install-appveyor-reqs.cmd Change Appveyor to download Clang from llvm.org instead of my private server 2017-05-04 19:04:50 +00:00