From ed2867debc8ee90ab65823e2fce73992044c795c Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Thu, 22 May 2014 07:34:35 +0000 Subject: Remove the assertion which may cause IsDevicePathValid() hang in DEBUG build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Reviewed-by: Chao Zhang git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15544 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c index b48bf02ae8..7f21a60380 100644 --- a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c @@ -8,7 +8,7 @@ environment varibles. Multi-instance device paths should never be placed on a Handle. - Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -153,12 +153,8 @@ DevicePathNodeLength ( IN CONST VOID *Node ) { - UINTN Length; - ASSERT (Node != NULL); - Length = ReadUnaligned16 ((UINT16 *)&((EFI_DEVICE_PATH_PROTOCOL *)(Node))->Length[0]); - ASSERT (Length >= sizeof (EFI_DEVICE_PATH_PROTOCOL)); - return Length; + return ReadUnaligned16 ((UINT16 *)&((EFI_DEVICE_PATH_PROTOCOL *)(Node))->Length[0]); } /** -- cgit v1.2.3