diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-04 21:20:48 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-03-06 17:58:05 +0100 |
commit | 1d1f26386b3eff6af20bf05f57bd7b0959a0e926 (patch) | |
tree | 7a8ce7b6db3ef6b04e47af8b4d6eabe347fac2a6 | |
parent | 3e95ca44f8c6d0ba34a53b10365d3debc206192d (diff) |
fail on unknown version flags
Change-Id: Icbd2608a3341652b1b40f6bdebb66c4caf6e810a
Reviewed-on: https://gerrit.libreoffice.org/34896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit 90643e244cbd42866a49a7cf878dc9473ab2e6c0)
-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 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) |