[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/win

Michael Stahl mstahl at redhat.com
Sat Aug 29 13:13:16 PDT 2015


 vcl/win/source/gdi/winlayout.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cbcd7f88c2f800ac5fc95670eba26730d389c92f
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Aug 28 13:12:25 2015 +0200

    vcl: fix drmemory warning in UniscribeLayout::DropGlyph()
    
    It says there's access to uninitialized variable on that line,
    so propbably the loop is running over.
    
    Change-Id: I0226f82b20a6fbbc79af5bbb46af09830c3bc25a
    (cherry picked from commit eba9a6c4b32220dcc729c71e440234f90af5bdcc)
    Reviewed-on: https://gerrit.libreoffice.org/18107
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 51c77c0..22b6881 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -1495,7 +1495,7 @@ void UniscribeLayout::DropGlyph( int nStartx8 )
         DBG_ASSERT( nStart <= mnGlyphCount, "USPLayout::DropG overflow" );
 
         int j = pVI->mnMinGlyphPos;
-        while (mpOutGlyphs[j] == DROPPED_OUTGLYPH) j++;
+        while (j < mnGlyphCount && mpOutGlyphs[j] == DROPPED_OUTGLYPH) j++;
         if (j == nStart)
         {
             pVI->mnXOffset += ((mpJustifications)? mpJustifications[nStart] : mpGlyphAdvances[nStart]);


More information about the Libreoffice-commits mailing list