coverity#1158204 Unintentional integer overflow

Change-Id: I8e10fb52803dbd81e5490940a9a7e529beebc803
This commit is contained in:
Caolán McNamara
2014-01-23 20:25:57 +00:00
parent 1f10d5f71f
commit 89f7da7ac1

View File

@@ -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);