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

New commits:
commit cbcd7f88c2f800ac5fc95670eba26730d389c92f
Author: Michael Stahl <[email protected]>
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 <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Caolán McNamara <[email protected]>

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]);
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to