diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2011-08-04 00:57:43 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2011-08-04 00:57:43 +0200 |
commit | 49177f12a437e029a718a75d24406fad6050bcc4 (patch) | |
tree | 6f84d9756e0c7f6d68d19635e88289742b313fb4 | |
parent | 11d868f8d89cbdb1a6d3f7b87b033bed3c3d1cbe (diff) |
reject files with unmatched { or }
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 152c3d540..0dccaef0f 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/graphic/XGraphicProvider.hpp> +#include <com/sun/star/io/UnexpectedEOFException.hpp> #include <com/sun/star/util/DateTime.hpp> #include <editeng/borderline.hxx> #include <rtl/strbuf.hxx> @@ -475,12 +476,15 @@ void RTFDocumentImpl::resolve(Stream & rMapper) break; case ERROR_GROUP_OVER: OSL_TRACE("%s: unmatched '{'", OSL_THIS_FUNC); + throw io::UnexpectedEOFException(); break; case ERROR_EOF: OSL_TRACE("%s: unexpected end of file", OSL_THIS_FUNC); + throw io::UnexpectedEOFException(); break; case ERROR_HEX_INVALID: OSL_TRACE("%s: invalid hex char", OSL_THIS_FUNC); + throw io::WrongFormatException(); break; case ERROR_CHAR_OVER: OSL_TRACE("%s: characters after last '}'", OSL_THIS_FUNC); |