[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - setup_native/source vcl/win
Julien Nabet
serval2412 at yahoo.fr
Sun Sep 1 02:18:07 PDT 2013
setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx | 4 ++--
vcl/win/source/gdi/winlayout.cxx | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 777a659cf8814b7022ce9e1156f3a3b9f3322978
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Aug 31 21:08:42 2013 +0200
cppcheck: Array index is used before limits check
Change-Id: I531430ce4bc0937a023d3e2849ae07d8f94e3e70
Reviewed-on: https://gerrit.libreoffice.org/5723
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx
index a0f930a..40ed84b 100644
--- a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx
+++ b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx
@@ -280,7 +280,7 @@ static bool checkSomeExtensionInRegistry( const int nStart, const int nEnd )
int nIndex = nStart;
bool bFound = false;
- while ( !bFound && ( g_Extensions[nIndex] != 0 ) && ( nIndex < nEnd ) )
+ while ( !bFound && (nIndex < nEnd) && (g_Extensions[nIndex] != 0) )
{
bFound = ! CheckExtensionInRegistry( g_Extensions[nIndex] );
@@ -296,7 +296,7 @@ static void registerSomeExtensions( MSIHANDLE handle, const int nStart, const in
{ // Check all file extensions
int nIndex = nStart;
- while ( ( g_Extensions[nIndex] != 0 ) && ( nIndex < nEnd ) )
+ while ( (nIndex < nEnd) && (g_Extensions[nIndex] != 0) )
{
registerForExtension( handle, nIndex++, bRegister );
}
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 174539c..3113b0a 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -2038,7 +2038,7 @@ void UniscribeLayout::Simplify( bool /*bIsBase*/ )
int nMinGlyphPos, nEndGlyphPos, nOrigMinGlyphPos = rVI.mnMinGlyphPos;
GetItemSubrange( rVI, nMinGlyphPos, nEndGlyphPos );
i = nMinGlyphPos;
- while( (mpOutGlyphs[i] == cDroppedGlyph) && (i < nEndGlyphPos) )
+ while( (i < nEndGlyphPos) && (mpOutGlyphs[i] == cDroppedGlyph) )
{
rVI.mnMinGlyphPos = ++i;
}
More information about the Libreoffice-commits
mailing list