diff options
author | Michi Henning <michi@zeroc.com> | 2003-08-07 03:44:05 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2003-08-07 03:44:05 +0000 |
commit | 1f029c9e0c33b0e7b479aaa2dc22d71ebb71bef6 (patch) | |
tree | 5d4d3034522eef8e79e6a2fe68fbf1911aaef178 /cpp/src/Ice/BasicStream.cpp | |
parent | VC6 fixes (diff) | |
download | ice-1f029c9e0c33b0e7b479aaa2dc22d71ebb71bef6.tar.bz2 ice-1f029c9e0c33b0e7b479aaa2dc22d71ebb71bef6.tar.xz ice-1f029c9e0c33b0e7b479aaa2dc22d71ebb71bef6.zip |
Fixed two bugs in the bounds checking code for reading floats and doubles.
Diffstat (limited to 'cpp/src/Ice/BasicStream.cpp')
-rw-r--r-- | cpp/src/Ice/BasicStream.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index 1a3e44163d9..a075bfc534e 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -864,7 +864,7 @@ IceInternal::BasicStream::write(const vector<Float>& v) void IceInternal::BasicStream::read(Float& v) { - if(b.end() - i < static_cast<int>(sizeof(Int))) + if(b.end() - i < static_cast<int>(sizeof(Float))) { throw UnmarshalOutOfBoundsException(__FILE__, __LINE__); } @@ -981,7 +981,7 @@ IceInternal::BasicStream::write(const vector<Double>& v) void IceInternal::BasicStream::read(Double& v) { - if(b.end() - i < static_cast<int>(sizeof(Int))) + if(b.end() - i < static_cast<int>(sizeof(Double))) { throw UnmarshalOutOfBoundsException(__FILE__, __LINE__); } |