summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-03-28 09:09:00 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2024-04-03 14:38:51 +0200
commitfea111e56804ec761152af31fd083fb79b194cdf (patch)
treed9ae1589459ac5419f1754173dcf21b418f63a03
parenta47e278f36579926f341657db1d846416de61ba4 (diff)
ofz: negative column offset
Change-Id: Ieeb06e5c5d28f1c457db369a732bc37a7d5f2be8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165419 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 3f8c81f3f9ba1e27c97894c73e8802e5fdecf94b)
-rw-r--r--sc/source/filter/html/htmlpars.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 8abe9a4e95d9..1c230205e89b 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -737,6 +737,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 )