You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/base/src/TBuffer.cxx
+16-14Lines changed: 16 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -69,10 +69,10 @@ TBuffer::TBuffer(EMode mode)
69
69
/// Create an I/O buffer object. Mode should be either TBuffer::kRead or
70
70
/// TBuffer::kWrite.
71
71
72
-
TBuffer::TBuffer(EMode mode, Int_t bufsize)
72
+
TBuffer::TBuffer(EMode mode, Long64_t bufsize)
73
73
{
74
-
if (bufsize < 0)
75
-
Fatal("TBuffer","Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsize, kMaxBufferSize);
74
+
if (bufsize > kMaxBufferSize)
75
+
Fatal("TBuffer","Request to create a too large buffer: 0x%llx for a max of 0x%x.", bufsize, kMaxBufferSize);
76
76
if (bufsize < kMinimalSize) bufsize = kMinimalSize;
Fatal("TBuffer","Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsize, kMaxBufferSize);
105
+
if (bufsize > kMaxBufferSize)
106
+
Fatal("TBuffer","Request to create a too large buffer: 0x%llx for a max of 0x%x.", bufsize, kMaxBufferSize);
107
107
fBufSize = bufsize;
108
108
fMode = mode;
109
109
fVersion = 0;
@@ -154,10 +154,10 @@ TBuffer::~TBuffer()
154
154
/// If the size_needed is larger than the current size, the policy
155
155
/// is to expand to double the current size or the size_needed which ever is largest.
156
156
157
-
voidTBuffer::AutoExpand(Int_t size_needed)
157
+
voidTBuffer::AutoExpand(Long64_t size_needed)
158
158
{
159
-
if (size_needed < 0) {
160
-
Fatal("AutoExpand","Request to expand to a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", size_needed, kMaxBufferSize);
159
+
if (size_needed > kMaxBufferSize) {
160
+
Fatal("AutoExpand","Request to expand a too large buffer: 0x%llx for a max of 0x%x.", size_needed, kMaxBufferSize);
0 commit comments