From eb58bdd5529ec16f8ef7366f3b5528808faf4dd4 Mon Sep 17 00:00:00 2001 From: Martin Gallwey Date: Fri, 28 Sep 2001 15:45:17 +0000 Subject: #92549# throw IllegalArgumentException for illegal seek paramaters --- unotools/source/ucbhelper/xtempfile.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'unotools/source/ucbhelper/xtempfile.cxx') 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(); -- cgit v1.2.3