languageinterworkingfw/servicehandler/src/liwecommonitor.cpp
changeset 15 947415ec7603
parent 0 99ef825efeca
child 21 71d4435b6f65
--- a/languageinterworkingfw/servicehandler/src/liwecommonitor.cpp	Fri May 08 08:20:13 2009 +0300
+++ b/languageinterworkingfw/servicehandler/src/liwecommonitor.cpp	Fri Jul 03 15:51:30 2009 +0100
@@ -24,12 +24,13 @@
 #include "liwcommon.h"
 #include "liwuids.hrh"
 #include "liwserviceifbase.h"
+#include <LiwServiceHandler.h>
 
 // CONSTANTS
 _LIT8(KContentTag, "<CONTENT>");
 _LIT8(KOpaqueTag, "<OPAQUE>");
 _LIT8(KLiwMimeTypeAll, "*");
-
+const TInt KMaxCmdLength = 238;
 const TInt KMaxDataParamSize = 255;
 
 CLiwEcomMonitor* CLiwEcomMonitor::NewL(TCallBack& aSynchronizeCallBack)
@@ -94,6 +95,10 @@
     TUid resolvUid = { KLiwResolverImplUidValue };  
     
     TBuf8<KMaxDataParamSize> dataType;     
+    if(aItem->ServiceCmdStr().Length() + aItem->ContentType().Length() > KMaxCmdLength)
+        {        
+        User::Leave( KLiwUnknown );
+        }
     dataType.Copy(KContentTag);
     dataType.Append(aItem->ContentType());
     dataType.Append(KOpaqueTag);