summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-01-14 12:23:56 +0200
committerTor Lillqvist <tml@hemulen.(none)>2011-01-14 12:23:56 +0200
commit0459ed5d6025693e75397a86c41877739c7cedfb (patch)
treef72e665e2ff19bf8c3174f1bff03e89e584fb855 /desktop
parent5f23d395a7e65d2916ceb50372c3791918cbc11e (diff)
Be slightly more paranoid defensive
Diffstat (limited to 'desktop')
-rw-r--r--desktop/win32/source/setup/setup.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop/win32/source/setup/setup.cpp b/desktop/win32/source/setup/setup.cpp
index d3bd36965252..35335f9c5435 100644
--- a/desktop/win32/source/setup/setup.cpp
+++ b/desktop/win32/source/setup/setup.cpp
@@ -271,7 +271,7 @@ boolean SetupAppX::GetProfileSection( LPCTSTR pFileName, LPCTSTR pSection,
DWORD nRet = GetPrivateProfileSection( pSection, *pRetBuf, rSize, pFileName );
- while ( nRet && ( nRet + 2 == rSize ) ) // buffer was too small, retry until big enough
+ while ( nRet && ( nRet + 2 >= rSize ) ) // buffer was too small, retry until big enough
{
if (rSize > 1000000)
break;
@@ -291,7 +291,7 @@ boolean SetupAppX::GetProfileSection( LPCTSTR pFileName, LPCTSTR pSection,
Log( sBuf );
return false;
}
- else if ( nRet + 2 == rSize )
+ else if ( nRet + 2 >= rSize )
{
SetError( ERROR_OUTOFMEMORY );
Log( TEXT( "ERROR: GetPrivateProfileSection() out of memory\r\n" ) );