vcl/win/source/gdi/winlayout.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 3706003a81a47ea14011fe58dcef300a5b570f79 Author: Michael Stahl <mst...@redhat.com> Date: Fri Aug 28 13:13:39 2015 +0200 vcl: convert to assert in UniscribeLayout::DropGlyph() Change-Id: I918a47da16a539f981baa9a8c1e5a7a5cf642cf4 diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index f4dc9c0..7158e29 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -1482,7 +1482,7 @@ void UniscribeLayout::DropGlyph( int nStartx8 ) { DBG_ASSERT( !(nStartx8 & 0xff), "USP::DropGlyph(): glyph injection not disabled!" ); int nStart = nStartx8 >> 8; - DBG_ASSERT( nStart<=mnGlyphCount, "USPLayout::MoveG nStart overflow" ); + assert(nStart <= mnGlyphCount); if( nStart > 0 ) // nStart>0 means absolute glyph pos + 1 --nStart; @@ -1492,7 +1492,7 @@ void UniscribeLayout::DropGlyph( int nStartx8 ) for( int i = mnItemCount, nDummy; --i >= 0; ++pVI ) if( GetItemSubrange( *pVI, nStart, nDummy ) ) break; - DBG_ASSERT( nStart <= mnGlyphCount, "USPLayout::DropG overflow" ); + assert(nStart <= mnGlyphCount); int j = pVI->mnMinGlyphPos; while (j < mnGlyphCount && mpOutGlyphs[j] == DROPPED_OUTGLYPH) j++; commit eba9a6c4b32220dcc729c71e440234f90af5bdcc Author: Michael Stahl <mst...@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 diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index d341806..f4dc9c0 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 libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits