diff options
author | Martin Gallwey <mtg@openoffice.org> | 2001-09-28 15:45:17 +0000 |
---|---|---|
committer | Martin Gallwey <mtg@openoffice.org> | 2001-09-28 15:45:17 +0000 |
commit | eb58bdd5529ec16f8ef7366f3b5528808faf4dd4 (patch) | |
tree | 2fe16c9170fd183903f9a503c2a385a9e448a307 /unotools/source/ucbhelper/xtempfile.cxx | |
parent | #91305# SvImpLBox::KeyInput(): pass RETURN if not handled (diff) | |
download | core-eb58bdd5529ec16f8ef7366f3b5528808faf4dd4.tar.gz core-eb58bdd5529ec16f8ef7366f3b5528808faf4dd4.zip |
#92549# throw IllegalArgumentException for illegal seek paramaters
Diffstat (limited to 'unotools/source/ucbhelper/xtempfile.cxx')
-rw-r--r-- | unotools/source/ucbhelper/xtempfile.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx index bbc81803fada..a526096ab54e 100644 --- a/unotools/source/ucbhelper/xtempfile.cxx +++ b/unotools/source/ucbhelper/xtempfile.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xtempfile.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: mtg $ $Date: 2001-09-06 12:56:20 $ + * last change: $Author: mtg $ $Date: 2001-09-28 16:45:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -238,6 +238,8 @@ void SAL_CALL XTempFile::seek( sal_Int64 nLocation ) { MutexGuard aGuard( maMutex ); checkConnected(); + if ( nLocation < 0 || nLocation > getLength() ) + throw IllegalArgumentException(); mpStream->Seek((sal_uInt32) nLocation); checkError(); |