persistentstorage/dbms/ustor/US_TABLE.CPP
changeset 35 0d6db0a14001
parent 0 08ec8eefde2f
equal deleted inserted replaced
25:63532cdadd44 35:0d6db0a14001
   609 	const TUint8* rec=aRecord.Ptr();
   609 	const TUint8* rec=aRecord.Ptr();
   610 	const TUint8* end=rec+aRecord.Length();
   610 	const TUint8* end=rec+aRecord.Length();
   611 	TInt size;
   611 	TInt size;
   612 	rec=ReadCardinality(rec,size);
   612 	rec=ReadCardinality(rec,size);
   613 	size<<=2;
   613 	size<<=2;
   614 	if(size < 0)
   614 	
       
   615 	//If such huge allocation is requested(KMaxTInt/2), it is highly likely the file is corrupt
       
   616 	if((size < 0) || (size >= KMaxTInt/2))
   615 		{
   617 		{
   616 		aRow.SetSize(0);
   618 		aRow.SetSize(0);
   617 		__LEAVE(KErrCorrupt);
   619 		__LEAVE(KErrCorrupt);
   618 		}
   620 		}
   619 	
   621