Fix a bug in Ip4 driver that Ip4.Transmit() interface may return EFI_INVALID_PARAMETE...
authorFu Siyuan <siyuan.fu@intel.com>
Wed, 18 Sep 2013 02:27:20 +0000 (02:27 +0000)
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 18 Sep 2013 02:27:20 +0000 (02:27 +0000)
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Jin Eric <eric.jin@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14682 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c

index 29f07ce4a32c646f99ee6df56a07d035f1c2ed89..cd01685a304e5a6a4dc5940db0872e4d80dae7e2 100644 (file)
@@ -2002,7 +2002,8 @@ EfiIp4Transmit (
 \r
     RawHdrLen = (UINT8) (RawHdrLen & 0x0f);\r
     if (RawHdrLen < 5) {\r
-      return EFI_INVALID_PARAMETER;\r
+      Status = EFI_INVALID_PARAMETER;\r
+      goto ON_EXIT;\r
     }\r
 \r
     RawHdrLen = (UINT8) (RawHdrLen << 2);\r
@@ -2014,7 +2015,8 @@ EfiIp4Transmit (
     DontFragment = IP4_DO_NOT_FRAGMENT (Head.Fragment);\r
 \r
     if (!DontFragment) {\r
-      return EFI_INVALID_PARAMETER;\r
+      Status = EFI_INVALID_PARAMETER;\r
+      goto ON_EXIT;\r
     }\r
 \r
     GateWay = IP4_ALLZERO_ADDRESS;\r