summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 23:18:25 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 23:18:25 +0000
commit6154e30518a2504b047747fc970f5545f1895e01 (patch)
tree76ba13dddc3e38cbe83ab52454ed7b579af70434 /io
parentd2ee64e92117f48294f2e96b2742b1beaf6bb3fb (diff)
INTEGRATION: CWS warnings01 (1.2.88); FILE MERGED
2005/09/22 20:30:03 sb 1.2.88.2: RESYNC: (1.2-1.3); FILE MERGED 2005/09/01 08:14:29 sb 1.2.88.1: #i53898# Made code warning-free.
Diffstat (limited to 'io')
-rw-r--r--io/source/stm/streamhelper.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/io/source/stm/streamhelper.cxx b/io/source/stm/streamhelper.cxx
index d0a8449268f2..9d8ca767057c 100644
--- a/io/source/stm/streamhelper.cxx
+++ b/io/source/stm/streamhelper.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: streamhelper.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 18:31:59 $
+ * last change: $Author: hr $ $Date: 2006-06-20 00:18:25 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -34,6 +34,7 @@
************************************************************************/
#include <rtl/alloc.h>
+#include <limits>
#include <string.h>
#include <com/sun/star/uno/Sequence.hxx>
@@ -166,7 +167,7 @@ void MemRingBuffer::writeAt( sal_Int32 nPos, const Sequence<sal_Int8> &seq )
checkInvariants();
sal_Int32 nLen = seq.getLength();
- if( nPos > 0x80000000 || nPos < 0 || nPos + nLen < 0 || nPos + nLen > 0x80000000 )
+ if( nPos < 0 || nPos > std::numeric_limits< sal_Int32 >::max() - nLen )
{
throw IRingBuffer_OutOfBoundsException();
}