summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-04 21:20:48 +0000
committerAndras Timar <andras.timar@collabora.com>2017-03-06 16:08:04 +0100
commit5d4ed24dfa40a7a11d92796430927035a13bad12 (patch)
tree3fa264049b60a23e74fcd6119c40a3149165680e /lotuswordpro
parentaa848f6dd0dd26708630154d266eac6b3f084aff (diff)
fail on unknown version flags
Change-Id: Icbd2608a3341652b1b40f6bdebb66c4caf6e810a Reviewed-on: https://gerrit.libreoffice.org/34895 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit ad2748559c15d3eaa7e8be1506e3474002d4ef5b)
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/tocread.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx
index 192a63619cd6..73f9ccb5f329 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -109,13 +109,12 @@ CBenTOCReader::ReadLabel(unsigned long * pTOCOffset, unsigned long * pTOCSize)
BenByte * pCurrLabel = Label + BEN_MAGIC_BYTES_SIZE;
-#ifndef NDEBUG
BenWord Flags =
-#endif
UtGetIntelWord(pCurrLabel); pCurrLabel += 2; // Flags
// Newer files are 0x0101--indicates if big or little endian. Older
// files are 0x0 for flags
- assert(Flags == 0x0101 || Flags == 0x0);
+ if (Flags != 0x0101 && Flags != 0x0)
+ return BenErr_UnknownBentoFormatVersion;
cBlockSize = UtGetIntelWord(pCurrLabel) * 1024; pCurrLabel += 2;
if (cBlockSize == 0)