diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-04 21:20:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-04 21:23:45 +0000 |
commit | 0d1813cdaf44e3a8ae8878d6d87c28300451beb2 (patch) | |
tree | 19ca61b025ab14c15b52aff2a385e46e4a603403 /lotuswordpro/source | |
parent | 1d88c20fd03e753928df209fa5a640bb078afc9a (diff) |
fail on unknown version flags
Change-Id: Icbd2608a3341652b1b40f6bdebb66c4caf6e810a
Reviewed-on: https://gerrit.libreoffice.org/34894
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro/source')
-rw-r--r-- | lotuswordpro/source/filter/tocread.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx index 0b0a32eb6e1c..ce03e036fe3d 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) |