From f921ca3cc59825745b1eac52499d72ef8bfa1db5 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 21 Jul 2011 13:14:21 +0100 Subject: check return of osl_setFilePos --- xmlhelp/source/cxxhelp/provider/inputstream.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xmlhelp') diff --git a/xmlhelp/source/cxxhelp/provider/inputstream.cxx b/xmlhelp/source/cxxhelp/provider/inputstream.cxx index 0649c6d9e5c2..f5736b138a04 100644 --- a/xmlhelp/source/cxxhelp/provider/inputstream.cxx +++ b/xmlhelp/source/cxxhelp/provider/inputstream.cxx @@ -137,7 +137,11 @@ XInputStream_impl::skipBytes( io::IOException, uno::RuntimeException) { - m_aFile.setPos( osl_Pos_Current, sal_uInt64( nBytesToSkip ) ); + if (m_aFile.setPos(osl_Pos_Current, sal_uInt64(nBytesToSkip)) != osl::FileBase::E_None) + { + throw io::IOException(::rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("XInputStream_impl::skipBytes failed seek")), uno::Reference< uno::XInterface >()); + } } -- cgit