Kaydet (Commit) 87b26787 authored tarafından Caolán McNamara's avatar Caolán McNamara

abandon import on bad entry

Change-Id: I86a48eec43505966bca03aca947ab4d67de41e60
Reviewed-on: https://gerrit.libreoffice.org/58967Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
üst d206ddf6
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
#include <lwpobjstrm.hxx> #include <lwpobjstrm.hxx>
#include <lwptools.hxx> #include <lwptools.hxx>
#include <sal/log.hxx>
#include <sal/types.h> #include <sal/types.h>
#include <tools/solar.h> #include <tools/solar.h>
#include <memory> #include <memory>
...@@ -372,11 +371,9 @@ OUString LwpObjectStream::QuickReadStringPtr() ...@@ -372,11 +371,9 @@ OUString LwpObjectStream::QuickReadStringPtr()
QuickReaduInt16(); //len QuickReaduInt16(); //len
OUString str; OUString str;
if (diskSize >= sizeof diskSize) { if (diskSize < sizeof diskSize)
LwpTools::QuickReadUnicode(this, str, diskSize-sizeof(diskSize), RTL_TEXTENCODING_MS_1252); throw std::range_error("Too small size");
} else { LwpTools::QuickReadUnicode(this, str, diskSize-sizeof(diskSize), RTL_TEXTENCODING_MS_1252);
SAL_WARN("lwp", "Too small size " << diskSize);
}
return str; return str;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment