userlibandfileserver/fileserver/sfile/sf_obj.cpp
changeset 189 a5496987b1da
parent 90 947f0dc9f7a8
--- a/userlibandfileserver/fileserver/sfile/sf_obj.cpp	Wed Jun 23 12:58:21 2010 +0100
+++ b/userlibandfileserver/fileserver/sfile/sf_obj.cpp	Thu Jul 01 17:57:33 2010 +0100
@@ -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;