summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-04-12 12:26:54 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-04-13 10:29:52 +0200
commitf34a205e60846c91bcd22116c9e6e667ebb1e515 (patch)
treee1fd8cd4012169a8f9b9a12825ca336322eeffae
parent177589cb4f8ef20ff84dbfc141b145b28e57be83 (diff)
ofz#46352 assert on bad string offset
Change-Id: I60123fd0460b8038f08582a0bcbf2307af321df1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132862 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sc/source/ui/docshell/impex.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 260db563e203..a2360eb494c9 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2206,7 +2206,7 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm )
aFormats.push_back( nKey );
}
}
- else if( cTag == 'I' && *p == 'D' )
+ else if (cTag == 'I' && *p == 'D' && aLine.getLength() > 4)
{
aLine = aLine.copy(4);
if (aLine == "CALCOOO32")