Make pbump (internally) handle sizes bigger than MAX_INT. Fixes PR#33725 - thanks to Jonathan Wakely for the report

llvm-svn: 313031
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: d90758e2efff62e5207215d1a20672229ed26f2b
diff --git a/src/strstream.cpp b/src/strstream.cpp
index 01523cf..8b8521f 100644
--- a/src/strstream.cpp
+++ b/src/strstream.cpp
@@ -186,7 +186,7 @@
         }
         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 @@
                 // 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 @@
                     // 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;
             }