re PR libstdc++/47921 (pbump will overflow when input n is larger than 2G-1)
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 28 Feb 2011 23:50:57 +0000 (23:50 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 28 Feb 2011 23:50:57 +0000 (23:50 +0000)
commit1139a7354d6818da06edf5227ef6c12c08289b91
treeee95f0e866d1d1bafe977f8e5861e6f678607891
parent6dfef9cca7628d454ed535736f9d063a7d45911d
re PR libstdc++/47921 (pbump will overflow when input n is larger than 2G-1)

2011-02-28  Paolo Carlini  <paolo.carlini@oracle.com>

PR libstdc++/47921
* include/std/streambuf (basic_streambuf<>::__safe_gbump,
__safe_pbump): Add.
* include/bits/streambuf.tcc (basic_streambuf<>::xgetn,
xputn): Use the latter.
* include/bits/streambuf_iterator.h: Likewise.
* src/strstream.cc: Likewise.
* src/streambuf.cc: Likewise.
* src/compatibility.cc: Likewise.
* src/istream.cc: Likewise.
* include/bits/fstream.tcc (basic_filebuf<>::xsgetn): Use setg
instead of gbump.
* include/std/sstream (basic_stringbuf<>::_M_pbump): Add.
* include/bits/sstream.tcc (basic_stringbuf<>::seekoff,
seekpos, _M_sync): Use setg, setp, and _M_pbump.
* config/abi/pre/gnu.ver: Tweak.

From-SVN: r170579
12 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/include/bits/fstream.tcc
libstdc++-v3/include/bits/sstream.tcc
libstdc++-v3/include/bits/streambuf.tcc
libstdc++-v3/include/bits/streambuf_iterator.h
libstdc++-v3/include/std/sstream
libstdc++-v3/include/std/streambuf
libstdc++-v3/src/compatibility.cc
libstdc++-v3/src/istream.cc
libstdc++-v3/src/streambuf.cc
libstdc++-v3/src/strstream.cc