diff options
Diffstat (limited to 'cpp/src/Ice/BasicStream.cpp')
-rw-r--r-- | cpp/src/Ice/BasicStream.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index 9b0f6c560f6..779cc2db7f4 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -325,9 +325,9 @@ IceInternal::BasicStream::skipEncaps() { Int sz; read(sz); - if(sz < 0) + if(sz < 6) { - throw NegativeSizeException(__FILE__, __LINE__); + throw UnmarshalOutOfBoundsException(__FILE__, __LINE__); } if(i - sizeof(Int) + sz > b.end()) { @@ -368,9 +368,9 @@ IceInternal::BasicStream::startReadSlice() { Int sz; read(sz); - if(sz < 0) + if(sz < 4) { - throw NegativeSizeException(__FILE__, __LINE__); + throw UnmarshalOutOfBoundsException(__FILE__, __LINE__); } _readSlice = i - b.begin(); } @@ -385,9 +385,9 @@ IceInternal::BasicStream::skipSlice() { Int sz; read(sz); - if(sz < 0) + if(sz < 4) { - throw NegativeSizeException(__FILE__, __LINE__); + throw UnmarshalOutOfBoundsException(__FILE__, __LINE__); } i += sz - sizeof(Int); if(i > b.end()) @@ -2124,12 +2124,6 @@ IceInternal::BasicStream::throwUnmarshalOutOfBoundsException(const char* file, i } void -IceInternal::BasicStream::throwNegativeSizeException(const char* file, int line) -{ - throw NegativeSizeException(file, line); -} - -void IceInternal::BasicStream::throwUnsupportedEncodingException(const char* file, int line, Byte eMajor, Byte eMinor) { UnsupportedEncodingException ex(file, line); |