summaryrefslogtreecommitdiffstats
path: root/libcxx/src/strstream.cpp
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2017-09-12 15:00:43 +0000
committerMarshall Clow <mclow.lists@gmail.com>2017-09-12 15:00:43 +0000
commitd90758e2efff62e5207215d1a20672229ed26f2b (patch)
treed5c6f592deab0c090d68d6acf55749c9260ff4f3 /libcxx/src/strstream.cpp
parent7fb3847dfcd6af5ee52bf69df68b3f765f4d2b04 (diff)
downloadbcm5719-llvm-d90758e2efff62e5207215d1a20672229ed26f2b.tar.gz
bcm5719-llvm-d90758e2efff62e5207215d1a20672229ed26f2b.zip
Make pbump (internally) handle sizes bigger than MAX_INT. Fixes PR#33725 - thanks to Jonathan Wakely for the report
llvm-svn: 313031
Diffstat (limited to 'libcxx/src/strstream.cpp')
-rw-r--r--libcxx/src/strstream.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/src/strstream.cpp b/libcxx/src/strstream.cpp
index 01523cf4546..8b8521f76af 100644
--- a/libcxx/src/strstream.cpp
+++ b/libcxx/src/strstream.cpp
@@ -186,7 +186,7 @@ strstreambuf::overflow(int_type __c)
}
setg(buf, buf + ninp, buf + einp);
setp(buf + einp, buf + new_size);
- pbump(static_cast<int>(nout));
+ __pbump(nout);
__strmode_ |= __allocated;
}
*pptr() = static_cast<char>(__c);
@@ -282,7 +282,7 @@ strstreambuf::seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmod
// min(pbase, newpos), newpos, epptr()
__off = epptr() - newpos;
setp(min(pbase(), newpos), epptr());
- pbump(static_cast<int>((epptr() - pbase()) - __off));
+ __pbump((epptr() - pbase()) - __off);
}
__p = newoff;
}
@@ -312,7 +312,7 @@ strstreambuf::seekpos(pos_type __sp, ios_base::openmode __which)
// min(pbase, newpos), newpos, epptr()
off_type temp = epptr() - newpos;
setp(min(pbase(), newpos), epptr());
- pbump(static_cast<int>((epptr() - pbase()) - temp));
+ __pbump((epptr() - pbase()) - temp);
}
__p = newoff;
}
OpenPOWER on IntegriCloud