sc/source/filter/html/htmlpars.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 24fa67d72fbc4aa0474ffc243938c5dcb10349ae Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Apr 8 22:07:11 2024 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Mon Apr 15 09:38:18 2024 +0200 ofz#67906 Integer-overflow Change-Id: I459bdeef6bb7577c5388202374c981c7b01fa137 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165899 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166026 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index c6507bd54e15..36d0fbeb7fab 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -1039,7 +1039,7 @@ void ScHTMLLayoutParser::TableDataOn( HtmlImportInfo* pInfo ) case HtmlOptionId::COLSPAN: { sal_Int32 nColOverlap = rOption.GetString().toInt32(); - if (nColOverlap >= 0 && nColOverlap <= SCCOL_MAX) + if (nColOverlap >= 0 && nColOverlap <= mpDoc->MaxCol()) mxActEntry->nColOverlap = static_cast<SCCOL>(nColOverlap); else SAL_WARN("sc", "ScHTMLLayoutParser::TableDataOn ignoring colspan: " << nColOverlap); @@ -1048,7 +1048,7 @@ void ScHTMLLayoutParser::TableDataOn( HtmlImportInfo* pInfo ) case HtmlOptionId::ROWSPAN: { sal_Int32 nRowOverlap = rOption.GetString().toInt32(); - if (nRowOverlap >= 0) + if (nRowOverlap >= 0 && nRowOverlap <= mpDoc->MaxRow()) mxActEntry->nRowOverlap = static_cast<SCROW>(nRowOverlap); else SAL_WARN("sc", "ScHTMLLayoutParser::TableDataOn ignoring rowspan: " << nRowOverlap);