summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-04-12 12:26:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-04-12 14:56:32 +0200
commit0c7f683766c58062e3ea1e613ffd4d237ffcb856 (patch)
tree9fc475f310bfa0ece22e8694a51ca40bd8f5598d /sc/source/ui
parent58e156bc54177d0ed60f50181640f62189f72ac4 (diff)
ofz#46352 assert on bad string offset
Change-Id: I60123fd0460b8038f08582a0bcbf2307af321df1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132899 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui')
-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 422b1b0884e9..e7982d2f877b 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2332,7 +2332,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")