sc/source/filter/html/htmlpars.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit 79d1c80892b36d2c155aa6112de8b1a7b1e07ae8 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Apr 5 10:40:36 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Apr 5 15:19:27 2024 +0200 ofz#67854 UNKNOWN READ Change-Id: I37d2bc6153a8bf616d19105645f91b8519890e61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165813 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 07a2c260a13e..49e86d7ce1b2 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -686,8 +686,8 @@ void ScHTMLLayoutParser::Adjust() SkipLocked(pE.get(), false); if ( pE->nCol != nColBeforeSkip ) { - SCCOL nCount = static_cast<SCCOL>(maColOffset.size()); - if ( nCount <= pE->nCol ) + size_t nCount = maColOffset.size(); + if ( nCount <= o3tl::make_unsigned(pE->nCol) ) { pE->nOffset = static_cast<sal_uInt16>(maColOffset[nCount-1]); MakeCol( &maColOffset, pE->nOffset, pE->nWidth, nOffsetTolerance, nOffsetTolerance ); commit e74a8371f0ed92d11b652452d7ae85675d722279 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Apr 5 10:58:20 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Apr 5 15:19:18 2024 +0200 ofz#67782 Integer-overflow Change-Id: I039478c339e297f9fcb48a98099bc587b6b4aa32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165815 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 45d21cea1720..07a2c260a13e 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -1303,12 +1303,13 @@ void ScHTMLLayoutParser::TableOff( const HtmlImportInfo* pInfo ) else pTab1 = it->second.get(); SCROW nRowSpan = pE->nRowOverlap; - SCROW nRowKGV; + using SCUROW = std::make_unsigned_t<SCROW>; + SCUROW nRowKGV; SCROW nRowsPerRow1; // Outer table SCROW nRowsPerRow2; // Inner table if ( nRowSpan > 1 ) { // LCM to which we can map the inner and outer rows - nRowKGV = std::lcm( nRowSpan, nRows ); + nRowKGV = std::lcm<SCUROW>(nRowSpan, nRows); nRowsPerRow1 = nRowKGV / nRowSpan; nRowsPerRow2 = nRowKGV / nRows; }