[Libreoffice-commits] core.git: lotuswordpro/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Aug 14 12:45:17 UTC 2018
lotuswordpro/source/filter/lwpobjstrm.cxx | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
New commits:
commit 87b26787804cf1839d1eefd54854e647f716d934
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 14 08:40:05 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Aug 14 14:44:55 2018 +0200
abandon import on bad entry
Change-Id: I86a48eec43505966bca03aca947ab4d67de41e60
Reviewed-on: https://gerrit.libreoffice.org/58967
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Jenkins
diff --git a/lotuswordpro/source/filter/lwpobjstrm.cxx b/lotuswordpro/source/filter/lwpobjstrm.cxx
index b1b9744da682..4ac9fd11d6a5 100644
--- a/lotuswordpro/source/filter/lwpobjstrm.cxx
+++ b/lotuswordpro/source/filter/lwpobjstrm.cxx
@@ -57,7 +57,6 @@
#include <lwpobjstrm.hxx>
#include <lwptools.hxx>
-#include <sal/log.hxx>
#include <sal/types.h>
#include <tools/solar.h>
#include <memory>
@@ -372,11 +371,9 @@ OUString LwpObjectStream::QuickReadStringPtr()
QuickReaduInt16(); //len
OUString str;
- if (diskSize >= sizeof diskSize) {
- LwpTools::QuickReadUnicode(this, str, diskSize-sizeof(diskSize), RTL_TEXTENCODING_MS_1252);
- } else {
- SAL_WARN("lwp", "Too small size " << diskSize);
- }
+ if (diskSize < sizeof diskSize)
+ throw std::range_error("Too small size");
+ LwpTools::QuickReadUnicode(this, str, diskSize-sizeof(diskSize), RTL_TEXTENCODING_MS_1252);
return str;
}
More information about the Libreoffice-commits
mailing list