summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-02-10 23:38:32 +0100
committerKohei Yoshida <libreoffice@kohei.us>2014-02-12 16:02:50 +0000
commit135a37bd7b5a1a50e3da9cc666402adbd348d025 (patch)
treed4bd0529beca947436b482a331907b5a544edccf
parent1bd22f6c86bac5adea4698fabc92b896864c77ba (diff)
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 Reviewed-on: https://gerrit.libreoffice.org/7985 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
-rw-r--r--sot/source/sdstor/stgelem.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index 4299994acc72..4d2d154e0b59 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;
}