summaryrefslogtreecommitdiff
path: root/package/source/zipapi/ByteChucker.cxx
diff options
context:
space:
mode:
authorMartin Gallwey <mtg@openoffice.org>2001-09-28 15:31:56 +0000
committerMartin Gallwey <mtg@openoffice.org>2001-09-28 15:31:56 +0000
commitee17b7754b35e67f6a086165112287b2e08bcd39 (patch)
tree7b267220d4f1c3f944474d29d2c8fca0d7d5d5b7 /package/source/zipapi/ByteChucker.cxx
parentbc08738282e6b6b3708de5a6c56e19e7dcb60d34 (diff)
#92549# throw IllegalArgument Exception for illegal seeks
Diffstat (limited to 'package/source/zipapi/ByteChucker.cxx')
-rw-r--r--package/source/zipapi/ByteChucker.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/package/source/zipapi/ByteChucker.cxx b/package/source/zipapi/ByteChucker.cxx
index 63c6b038684d..5f870b1f60d3 100644
--- a/package/source/zipapi/ByteChucker.cxx
+++ b/package/source/zipapi/ByteChucker.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ByteChucker.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: mtg $ $Date: 2001-09-06 10:38:35 $
+ * last change: $Author: mtg $ $Date: 2001-09-28 16:31:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -107,6 +107,8 @@ sal_Int64 SAL_CALL ByteChucker::seek( sal_Int64 location )
throw(IllegalArgumentException, IOException, RuntimeException)
{
sal_Int64 nLen = xSeek->getLength();
+ if ( location < 0 || location > nLen )
+ throw IllegalArgumentException();
if (location > nLen )
location = nLen;
xSeek->seek( location );