summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/DevicePathDxe
diff options
context:
space:
mode:
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-19 01:55:14 +0000
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-19 01:55:14 +0000
commit3069bc194422eea310b17effd6700f6e0b5b58e8 (patch)
tree47d87e2f0ab4e425a567e46d1997c6362365c449 /MdeModulePkg/Universal/DevicePathDxe
parent19c804c4b36de51c17f576e0f18aeee91784fdad (diff)
downloadedk2-platforms-3069bc194422eea310b17effd6700f6e0b5b58e8.tar.xz
Add some ASSERT()s.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7299 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DevicePathDxe')
-rw-r--r--MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c3
-rw-r--r--MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c b/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
index e0f1fcea48..f7e7cdfcfb 100644
--- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
+++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
@@ -2763,6 +2763,7 @@ ConvertTextToDeviceNode (
ParamStr = NULL;
DumpNode = NULL;
DeviceNodeStr = StrDuplicate (TextDeviceNode);
+ ASSERT (DeviceNodeStr != NULL);
for (Index = 0; DevPathFromTextTable[Index].Function; Index++) {
ParamStr = GetParamByNodeName (DeviceNodeStr, DevPathFromTextTable[Index].DevicePathNodeText);
@@ -2822,6 +2823,7 @@ ConvertTextToDevicePath (
}
DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocatePool (END_DEVICE_PATH_LENGTH);
+ ASSERT (DevicePath != NULL);
SetDevicePathEndNode (DevicePath);
ParamStr = NULL;
@@ -2857,6 +2859,7 @@ ConvertTextToDevicePath (
if (IsInstanceEnd != 0) {
DeviceNode = (EFI_DEVICE_PATH_PROTOCOL *) AllocatePool (END_DEVICE_PATH_LENGTH);
+ ASSERT (DeviceNode != NULL);
SET_DEVICE_PATH_INSTANCE_END_NODE (DeviceNode);
NewDevicePath = AppendDeviceNodeProtocolInterface (DevicePath, DeviceNode);
diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c b/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c
index 2e4a976adc..d45c267ffb 100644
--- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c
+++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c
@@ -708,6 +708,7 @@ DevPathToTextUsbWWID (
// In case no NULL terminator in SerialNumber, create a new one with NULL terminator
//
NewStr = AllocateCopyPool ((Length + 1) * sizeof (CHAR16), SerialNumberStr);
+ ASSERT (NewStr != NULL);
NewStr [Length] = 0;
SerialNumberStr = NewStr;
}