From 89f7da7ac180dd15a06bef32f447f997e1fdff03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 23 Jan 2014 20:25:57 +0000 Subject: [PATCH] coverity#1158204 Unintentional integer overflow Change-Id: I8e10fb52803dbd81e5490940a9a7e529beebc803 --- connectivity/source/drivers/dbase/dindexnode.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index aabc1c1d224e..963a4009b008 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -848,7 +848,8 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) SvStream& connectivity::dbase::WriteONDXPage(SvStream &rStream, const ONDXPage& rPage) { // Page doesn't exist yet - sal_uIntPtr nSize = (rPage.GetPagePos() + 1) * DINDEX_PAGE_SIZE; + sal_Size nSize = rPage.GetPagePos() + 1; + nSize *= DINDEX_PAGE_SIZE; if (nSize > rStream.Seek(STREAM_SEEK_TO_END)) { rStream.SetStreamSize(nSize);