persistentstorage/dbms/ustor/US_TABLE.CPP
branchGCC_SURGE
changeset 38 c4e342fcf0c8
parent 35 0d6db0a14001
--- a/persistentstorage/dbms/ustor/US_TABLE.CPP	Mon Jun 21 22:46:09 2010 +0100
+++ b/persistentstorage/dbms/ustor/US_TABLE.CPP	Thu Jul 22 16:49:09 2010 +0100
@@ -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);