From 6aea1876a88a9c9bbae6f16c43899747a1c75fa8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 28 Oct 2014 20:42:48 +0000 Subject: improve coverity#1242796 calculation Change-Id: I0a462d043aaa67863d5f1906451e66d01b634a8f --- sc/source/filter/excel/xltoolbar.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sc/source/filter/excel') 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; -- cgit