[Libreoffice-commits] .: Branch 'libreoffice-3-5' - vcl/source

Petr Mladek pmladek at kemper.freedesktop.org
Tue Mar 20 03:52:07 PDT 2012


 vcl/source/glyphs/graphite_layout.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 39a7666cc0ac056bb682c89163a8d2155f57b775
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Feb 22 23:48:52 2012 +0100

    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 at suse.cz>
    Signed-off-by: Martin Hosken <martin_hosken at sil.org>

diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index d39c292..e0898b2 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))


More information about the Libreoffice-commits mailing list