summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-28 20:42:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-10-29 10:40:07 +0000
commit6aea1876a88a9c9bbae6f16c43899747a1c75fa8 (patch)
tree131b4e6665b24b04d2e578fe6a619f81bc625e2f
parent52d98d8e716cf59eb4a8cbdec11d42d47608e6bb (diff)
improve coverity#1242796 calculation
Change-Id: I0a462d043aaa67863d5f1906451e66d01b634a8f
-rw-r--r--sc/source/filter/excel/xltoolbar.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx
index f85f455eca04..6d307f41706f 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -361,7 +361,7 @@ ScCTBWrapper::Read( SvStream &rS)
//ScCTB is 1 TB which is min 15bytes, nViews TBVisualData which is min 20bytes
//and one 32bit number (4 bytes)
- const size_t nMinRecordSize = 39;
+ const size_t nMinRecordSize = 19 + ctbSet.ctbViews * 20;
const size_t nMaxPossibleRecords = rS.remainingSize()/nMinRecordSize;
if (ctbSet.ctb > nMaxPossibleRecords)
return false;