lotuswordpro/source/filter/tocread.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 90643e244cbd42866a49a7cf878dc9473ab2e6c0
Author: Caolán McNamara <[email protected]>
Date:   Sat Mar 4 21:20:48 2017 +0000

    fail on unknown version flags
    
    Change-Id: Icbd2608a3341652b1b40f6bdebb66c4caf6e810a
    Reviewed-on: https://gerrit.libreoffice.org/34896
    Tested-by: Jenkins <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>

diff --git a/lotuswordpro/source/filter/tocread.cxx 
b/lotuswordpro/source/filter/tocread.cxx
index 192a636..73f9ccb 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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to