uigraphics/AknIcon/srvsrc/AknIconSrv.cpp
branchRCL_3
changeset 11 33ddb261ab37
parent 10 08459e712984
child 24 e4e3998ddda2
--- a/uigraphics/AknIcon/srvsrc/AknIconSrv.cpp	Tue Apr 27 17:41:10 2010 +0300
+++ b/uigraphics/AknIcon/srvsrc/AknIconSrv.cpp	Tue May 11 17:09:13 2010 +0300
@@ -742,6 +742,7 @@
 CAknIconSrvIconItem* CAknIconServer::CreateIconL(
     const TAknIconParams& aInfo )
     {
+    const TInt KMaxIconDataLimit = 0xFA000;
     CFbsBitmap* bitmap = new (ELeave) CFbsBitmap;
     CleanupStack::PushL( bitmap );
 
@@ -765,6 +766,11 @@
 
     TPtrC8 iconData = InitIconDataAndHandlerLC(aInfo, loader, handler);        
 
+    if(iconData.Size()>KMaxIconDataLimit)
+        {
+        User::Leave(KErrTooBig);
+        }
+    
     bitmapDepth = (TDisplayMode)loader->IconDepthL( aInfo.iBitmapId );    
 
     handler->PrepareIconL( iconData, handle );