summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-02-22 23:48:52 +0100
committerPetr Mladek <pmladek@suse.cz>2012-03-20 11:51:17 +0100
commit39a7666cc0ac056bb682c89163a8d2155f57b775 (patch)
treef42c1e8dac98ad0e1f2b05b472a91eee54b0fa40
parent8f769141f35f18782f3e43862baedf40d3ce19c6 (diff)
vcl: crash in GraphiteLayout::expandOrCondense:
When printing the bugdoc from i#103958: error: attempt to subscript container with out-of-bounds index 5, but container only holds 5 elements. Signed-off-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Martin Hosken <martin_hosken@sil.org>
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index d39c292c164c..e0898b2b7353 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -843,7 +843,7 @@ void GraphiteLayout::expandOrCondense(ImplLayoutArgs &rArgs)
assert(nCharIndex > -1);
mvCharDxs[nCharIndex-mnMinCharPos] += nOffset;
// adjust char dxs for rest of characters in cluster
- while (++nCharIndex < static_cast<int>(mvGlyph2Char.size()))
+ while (++nCharIndex - mnMinCharPos < static_cast<int>(mvChar2BaseGlyph.size()))
{
int nChar2Base = mvChar2BaseGlyph[nCharIndex-mnMinCharPos];
if (nChar2Base == -1 || nChar2Base == static_cast<int>(i))