Kaydet (Commit) 3d39dad6 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#10228 Integer-overflow

Change-Id: Ifb7e6ad6f5ffe71c3c5bb7cca9cb3b27bff7943a
Reviewed-on: https://gerrit.libreoffice.org/60308Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst d072795d
......@@ -627,8 +627,8 @@ void DomainMapperTableManager::endOfRowAction()
// a grid of "20:40:20" and it doesn't have to do something with the tableWidth
// -> so we have get the sum of each grid entry for the fullWidthRelative:
int nFullWidthRelative = 0;
for (sal_Int32 i : (*pTableGrid.get()))
nFullWidthRelative += i;
for (int i : (*pTableGrid.get()))
nFullWidthRelative = o3tl::saturating_add(nFullWidthRelative, i);
if( pTableGrid->size() == ( m_nGridBefore + nGrids + m_nGridAfter ) && m_nCell.back( ) > 0 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment