sc/source/filter/html/htmlpars.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 257ba94f52c36d42ae05272dc9d42a35828ef993 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Apr 16 17:34:35 2024 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Apr 17 15:46:50 2024 +0200 ofz#68081 keep within bounds Change-Id: Ib7f11f2447d5a2cc6b9b559727f2a0127c15913e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166154 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> (cherry picked from commit c09c61f5e3f7207006c3a26f5a79fabc29600350) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166098 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 36d0fbeb7fab..ee698a157827 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -894,7 +894,7 @@ void ScHTMLLayoutParser::Colonize( ScEEParseEntry* pE ) { // Replaced nCol = pE->nCol - nColCntStart; SCCOL nCount = static_cast<SCCOL>(xLocalColOffset->size()); - if ( nCol < nCount ) + if (nCol >= 0 && nCol < nCount) nColOffset = static_cast<sal_uInt16>((*xLocalColOffset)[nCol]); else nColOffset = static_cast<sal_uInt16>((*xLocalColOffset)[nCount - 1]);