From f34a205e60846c91bcd22116c9e6e667ebb1e515 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 12 Apr 2022 12:26:54 +0100 Subject: 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 --- sc/source/ui/docshell/impex.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- cgit