--- a/metadataengine/server/src/mdsclausebuffer.cpp Tue Feb 02 00:24:33 2010 +0200
+++ b/metadataengine/server/src/mdsclausebuffer.cpp Fri Mar 19 09:38:01 2010 +0200
@@ -62,15 +62,11 @@
//
void CMdsClauseBuffer::ConstructL( TInt aInitialSize )
{
- if ( aInitialSize < 1 )
+ if ( aInitialSize < 1 || aInitialSize > 100000 )
{
aInitialSize = 1;
}
iCurrentBufSize = aInitialSize;
- if (aInitialSize > 100000 || aInitialSize < 0)
- {
- aInitialSize = 0;
- }
iBuffer = HBufC::NewL( iCurrentBufSize );
}
@@ -104,11 +100,11 @@
return EFalse;
}
+ // realloc and copy
+ iBuffer = iBuffer->ReAllocL( aRequired );
+
iCurrentBufSize = aRequired;
- // realloc and copy
- iBuffer = iBuffer->ReAllocL( iCurrentBufSize );
-
return ETrue;
}