userlibandfileserver/fileserver/sfile/sf_obj.cpp
changeset 102 ef2a444a7410
parent 90 947f0dc9f7a8
--- a/userlibandfileserver/fileserver/sfile/sf_obj.cpp	Fri Apr 16 16:24:37 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_obj.cpp	Mon May 03 13:47:38 2010 +0300
@@ -129,7 +129,13 @@
 			if (newAlloc!=iAllocated)
 				{
 				if (newAlloc)
+				    {
 					iContainers=(CFsObjectCon**)User::ReAlloc(iContainers,newAlloc*sizeof(CFsObjectCon*));
+					if(!iContainers)
+					    {
+					    Fault(EContainerHeapCorruptionOnRemove);
+					    }
+				    }
 				else
 					{
 					delete iContainers;
@@ -489,7 +495,13 @@
 		if (newAlloc!=iAllocated)
 			{
 			if (newAlloc)
+			    {
 				iObjects=(SFsObjectIxRec*)User::ReAlloc(iObjects,newAlloc*sizeof(SFsObjectIxRec));
+				if(!iObjects)
+				    {
+                    Fault(EContainerHeapCorruptionOnRemove);
+				    }
+			    }
 			else
 				{
 				delete iObjects;
@@ -679,7 +691,13 @@
 			if (newAlloc!=iAllocated)
 				{
 				if (newAlloc)
+				    {
 					iObjects=(CFsObject**)User::ReAlloc(iObjects,newAlloc*sizeof(CFsObject*));
+					if(!iObjects)
+					    {
+					    Fault(EContainerHeapCorruptionOnRemove);
+					    }
+				    }
 				else
 					{
 					delete iObjects;