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 @@
#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;
}
......
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