summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-10 14:07:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-10 14:08:27 +0000
commit84e15f7b570a7c86e694f6f1bf3029c8fd04caa6 (patch)
treefc64ecf39d8faf8a3e31624116383341d91c75c7 /lotuswordpro
parent55b886584ee6b4cd64b45908b00eb34167d28e83 (diff)
avoid divide by zero
Change-Id: I7d6502c752a7b9f39f94d5cddd5f44240e0b6d04 (cherry picked from commit 92b936e3ef947cc096b1445455332625900c3024)
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/tocread.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx
index e829adde302d..192a63619cd6 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -118,6 +118,8 @@ CBenTOCReader::ReadLabel(unsigned long * pTOCOffset, unsigned long * pTOCSize)
assert(Flags == 0x0101 || Flags == 0x0);
cBlockSize = UtGetIntelWord(pCurrLabel) * 1024; pCurrLabel += 2;
+ if (cBlockSize == 0)
+ return BenErr_NotBentoContainer;
// Check major version
if (UtGetIntelWord(pCurrLabel) != BEN_CURR_MAJOR_VERSION)