lotuswordpro/source/filter/tocread.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
New commits: commit 0d1813cdaf44e3a8ae8878d6d87c28300451beb2 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Mar 4 21:20:48 2017 +0000 fail on unknown version flags Change-Id: Icbd2608a3341652b1b40f6bdebb66c4caf6e810a Reviewed-on: https://gerrit.libreoffice.org/34894 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx index 0b0a32e..ce03e03 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)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits