From b3621802219d3ad7d8eafbb9367903c9001a3602 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Mon, 10 Feb 2014 23:38:32 +0100 Subject: fix crash during xls import, related fdo#36580 Looks like a possibly invalid xls file but let us just do the right thing and not crash. Change-Id: Id96db06798cd19d96938ca84956046e5a5e5b529 --- sot/source/sdstor/stgelem.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sot') diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx index 0ac6bae0988f..ed1a14498c55 100644 --- a/sot/source/sdstor/stgelem.cxx +++ b/sot/source/sdstor/stgelem.cxx @@ -299,7 +299,7 @@ bool StgEntry::SetName( const OUString& rName ) } int i; - for( i = 0; i < aName.getLength() && i < 32; i++ ) + for( i = 0; i < rName.getLength() && i < 32; i++ ) { nName[ i ] = rName[ i ]; } @@ -307,7 +307,7 @@ bool StgEntry::SetName( const OUString& rName ) { nName[ i++ ] = 0; } - nNameLen = ( aName.getLength() + 1 ) << 1; + nNameLen = ( rName.getLength() + 1 ) << 1; return true; } -- cgit