[Libreoffice-commits] core.git: svl/source
Caolán McNamara
caolanm at redhat.com
Wed Aug 20 01:40:07 PDT 2014
svl/source/numbers/zformat.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit d01ee7e2cc7315728a5a8e04bb1d6847ec185483
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Aug 20 09:38:34 2014 +0100
fix string out-of-bounds assert on gnome627759-1.ods
i.e. on soffice --headless --convert-to pdf gnome627759-1.ods
Change-Id: I01289d5afcc79b7180cc12f8ee345ac760b6a637
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 633b803..aa0b8a6 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -4359,7 +4359,8 @@ bool SvNumberformat::ImpGetNumberOutput(double fNumber,
}
break;
case NF_SYMBOLTYPE_BLANK:
- /*k = */ InsertBlanks(sStr, k, rInfo.sStrArray[j][1] );
+ if (rInfo.sStrArray[j].getLength() >= 2)
+ /*k = */ InsertBlanks(sStr, k, rInfo.sStrArray[j][1] );
break;
case NF_SYMBOLTYPE_STRING:
case NF_SYMBOLTYPE_CURRENCY:
@@ -4492,7 +4493,8 @@ bool SvNumberformat::ImpNumberFillWithThousands( OUStringBuffer& sBuff, // numb
}
break;
case NF_SYMBOLTYPE_BLANK:
- /*k = */ InsertBlanks(sBuff, k, rInfo.sStrArray[j][1] );
+ if (rInfo.sStrArray[j].getLength() >= 2)
+ /*k = */ InsertBlanks(sBuff, k, rInfo.sStrArray[j][1] );
break;
case NF_SYMBOLTYPE_THSEP:
// #i7284# #102685# Insert separator also if number is divided
More information about the Libreoffice-commits
mailing list