ofz#11472 Integer-overflow

Change-Id: I4776e416071e94468868847420c17d752d39c081
Reviewed-on: https://gerrit.libreoffice.org/63695
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2018-11-21 08:58:49 +00:00
parent 2edc8c5343
commit e41667762b

View File

@@ -664,7 +664,9 @@ void TableLayouter::LayoutTableWidth( tools::Rectangle& rArea, bool bFit )
}
if( bChanges )
nCurrentWidth += maColumns[nCol].mnSize - nOldSize;
{
nCurrentWidth = o3tl::saturating_add(nCurrentWidth, maColumns[nCol].mnSize - nOldSize);
}
}
// now scale if wanted and needed