sc/source/filter/html/htmlpars.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 86837b3d67cfe48a9983a13c5794147e192491a0
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Mar 28 09:09:00 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Mar 28 16:51:55 2024 +0100

    ofz: negative column offset
    
    Change-Id: Ieeb06e5c5d28f1c457db369a732bc37a7d5f2be8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165447
    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 5bf4c4c07a83..5ea4c4a5997a 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -852,6 +852,11 @@ void ScHTMLLayoutParser::SetWidths()
                 OSL_ENSURE( nCol < nColsPerRow, 
"ScHTMLLayoutParser::SetWidths: column overflow" );
                 if (nCol >= nColsPerRow)
                     continue;
+                if (nCol < 0)
+                {
+                    SAL_WARN("sc", "negative offset: " << nCol);
+                    continue;
+                }
                 pE->nOffset = pOffsets[nCol];
                 nCol = nCol + pE->nColOverlap;
                 if ( nCol > nColsPerRow )

Reply via email to