summaryrefslogtreecommitdiff
path: root/cpp/include/Ice/BasicStream.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/Ice/BasicStream.h')
-rw-r--r--cpp/include/Ice/BasicStream.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/cpp/include/Ice/BasicStream.h b/cpp/include/Ice/BasicStream.h
index 2bd59ec884d..beb4eebc2b2 100644
--- a/cpp/include/Ice/BasicStream.h
+++ b/cpp/include/Ice/BasicStream.h
@@ -225,9 +225,9 @@ public:
//
Ice::Int sz;
read(sz);
- if(sz < 0)
+ if(sz < 6)
{
- throwNegativeSizeException(__FILE__, __LINE__);
+ throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
}
if(i - sizeof(Ice::Int) + sz > b.end())
{
@@ -283,11 +283,6 @@ public:
{
Ice::Int sz;
read(sz);
- if(sz < 0)
- {
- throwNegativeSizeException(__FILE__, __LINE__);
- }
-
if(sz != static_cast<Ice::Int>(sizeof(Ice::Int)) + 2)
{
throwEncapsulationException(__FILE__, __LINE__);
@@ -359,7 +354,7 @@ public:
read(v);
if(v < 0)
{
- throwNegativeSizeException(__FILE__, __LINE__);
+ throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
}
}
else
@@ -629,7 +624,6 @@ private:
// ordering.
//
void throwUnmarshalOutOfBoundsException(const char*, int);
- void throwNegativeSizeException(const char*, int);
void throwUnsupportedEncodingException(const char*, int, Ice::Byte, Ice::Byte);
void throwEncapsulationException(const char*, int);