--- a/mpserviceplugins/mpxsqlitedbcommon/src/mpxdbcommonutil.cpp Fri Aug 06 16:51:36 2010 -0500
+++ b/mpserviceplugins/mpxsqlitedbcommon/src/mpxdbcommonutil.cpp Tue Aug 24 03:36:14 2010 -0500
@@ -329,7 +329,8 @@
extractPos = KMCPathStartPos; // c:\..., include first '\' of the path
}
- TBuf<KMaxFileName+KMCIntegerLen> fileName;
+ HBufC* fileNameBuf = HBufC::NewLC(aName.Length()+KMCIntegerLen);
+ TPtr fileName(fileNameBuf->Des());
if( extractPos )
{
// append volume's unique Id to path to maintain uniqueness
@@ -357,7 +358,7 @@
TInt narrowFileLen(0);
TPtrC8 narrowFileName;
#if defined(_UNICODE)
- narrowFileLen = fileName.Length() * 2;
+ narrowFileLen = fileNameBuf->Des().Length() * 2;
narrowFileName.Set((TUint8*)fileName.Ptr(), narrowFileLen);
#else
narrowFileLen = fileName.Length();
@@ -375,6 +376,9 @@
TUint32 uniqueId(0);
uniqueId = aTableId << 28;
uniqueId |= (ptr[3]&0x0F)<<24 | (ptr[2]<<16) | (ptr[1]<<8) | ptr[0];
+
+ CleanupStack::PopAndDestroy(fileNameBuf);
+
return uniqueId;
}