persistentstorage/dbms/ustor/US_TABLE.CPP
branchRCL_3
changeset 16 b6ab70c1385f
parent 0 08ec8eefde2f
--- a/persistentstorage/dbms/ustor/US_TABLE.CPP	Tue May 25 14:35:19 2010 +0300
+++ b/persistentstorage/dbms/ustor/US_TABLE.CPP	Wed Jun 09 11:36:09 2010 +0300
@@ -611,7 +611,9 @@
 	TInt size;
 	rec=ReadCardinality(rec,size);
 	size<<=2;
-	if(size < 0)
+	
+	//If such huge allocation is requested(KMaxTInt/2), it is highly likely the file is corrupt
+	if((size < 0) || (size >= KMaxTInt/2))
 		{
 		aRow.SetSize(0);
 		__LEAVE(KErrCorrupt);