coverity#1158204 Unintentional integer overflow
Change-Id: I8e10fb52803dbd81e5490940a9a7e529beebc803
This commit is contained in:
@@ -848,7 +848,8 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage)
|
|||||||
SvStream& connectivity::dbase::WriteONDXPage(SvStream &rStream, const ONDXPage& rPage)
|
SvStream& connectivity::dbase::WriteONDXPage(SvStream &rStream, const ONDXPage& rPage)
|
||||||
{
|
{
|
||||||
// Page doesn't exist yet
|
// 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))
|
if (nSize > rStream.Seek(STREAM_SEEK_TO_END))
|
||||||
{
|
{
|
||||||
rStream.SetStreamSize(nSize);
|
rStream.SetStreamSize(nSize);
|
||||||
|
Reference in New Issue
Block a user