]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c
ShellPkg/DP: Add more check for input parameters
[mirror_edk2.git] / ShellPkg / DynamicCommand / TftpDynamicCommand / Tftp.c
index 8569c966ddf3be4c7e4dd039f852429c3588111c..e2491cd54cae5b5e970cb020bd8c3aed1493e121 100644 (file)
@@ -2,7 +2,7 @@
   The implementation for the 'tftp' Shell command.\r
 \r
   Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>\r
   The implementation for the 'tftp' Shell command.\r
 \r
   Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>\r
-  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved. <BR>\r
   (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 \r
   This program and the accompanying materials\r
   (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 \r
   This program and the accompanying materials\r
@@ -50,8 +50,8 @@ STATIC CONST CHAR16 mTftpProgressDelete[] = L"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b
   @return     TRUE      The value was returned.\r
   @return     FALSE     A parsing error occured.\r
 **/\r
   @return     TRUE      The value was returned.\r
   @return     FALSE     A parsing error occured.\r
 **/\r
-STATIC \r
-BOOLEAN \r
+STATIC\r
+BOOLEAN\r
 StringToUint16 (\r
   IN   CONST CHAR16  *ValueStr,\r
   OUT  UINT16        *Value\r
 StringToUint16 (\r
   IN   CONST CHAR16  *ValueStr,\r
   OUT  UINT16        *Value\r
@@ -64,7 +64,7 @@ StringToUint16 (
   @param[in]   NicNumber         The network physical device number.\r
   @param[out]  NicName           Address where to store the NIC name.\r
                                  The memory area has to be at least\r
   @param[in]   NicNumber         The network physical device number.\r
   @param[out]  NicName           Address where to store the NIC name.\r
                                  The memory area has to be at least\r
-                                 IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH \r
+                                 IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH\r
                                  double byte wide.\r
 \r
   @return  EFI_SUCCESS  The name of the NIC was returned.\r
                                  double byte wide.\r
 \r
   @return  EFI_SUCCESS  The name of the NIC was returned.\r
@@ -75,8 +75,8 @@ StringToUint16 (
                         Managed Network Protocol could not be\r
                         read.\r
 **/\r
                         Managed Network Protocol could not be\r
                         read.\r
 **/\r
-STATIC \r
-EFI_STATUS \r
+STATIC\r
+EFI_STATUS\r
 GetNicName (\r
   IN   EFI_HANDLE  ControllerHandle,\r
   IN   UINTN       NicNumber,\r
 GetNicName (\r
   IN   EFI_HANDLE  ControllerHandle,\r
   IN   UINTN       NicNumber,\r
@@ -102,8 +102,8 @@ GetNicName (
   @return  Others       Either the creation of the child or the opening\r
                         of the protocol failed.\r
 **/\r
   @return  Others       Either the creation of the child or the opening\r
                         of the protocol failed.\r
 **/\r
-STATIC \r
-EFI_STATUS \r
+STATIC\r
+EFI_STATUS\r
 CreateServiceChildAndOpenProtocol (\r
   IN   EFI_HANDLE  ControllerHandle,\r
   IN   EFI_GUID    *ServiceBindingProtocolGuid,\r
 CreateServiceChildAndOpenProtocol (\r
   IN   EFI_HANDLE  ControllerHandle,\r
   IN   EFI_GUID    *ServiceBindingProtocolGuid,\r
@@ -124,8 +124,8 @@ CreateServiceChildAndOpenProtocol (
   @param[in]  ChildHandle                 Handle of the child to be destroyed.\r
 \r
 **/\r
   @param[in]  ChildHandle                 Handle of the child to be destroyed.\r
 \r
 **/\r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 CloseProtocolAndDestroyServiceChild (\r
   IN  EFI_HANDLE  ControllerHandle,\r
   IN  EFI_GUID    *ServiceBindingProtocolGuid,\r
 CloseProtocolAndDestroyServiceChild (\r
   IN  EFI_HANDLE  ControllerHandle,\r
   IN  EFI_GUID    *ServiceBindingProtocolGuid,\r
@@ -148,8 +148,8 @@ CloseProtocolAndDestroyServiceChild (
                             (see EFI_MTFTP4_PROTOCOL.GetInfo() status codes)\r
                             or error when parsing the response of the server.\r
 **/\r
                             (see EFI_MTFTP4_PROTOCOL.GetInfo() status codes)\r
                             or error when parsing the response of the server.\r
 **/\r
-STATIC \r
-EFI_STATUS \r
+STATIC\r
+EFI_STATUS\r
 GetFileSize (\r
   IN   EFI_MTFTP4_PROTOCOL  *Mtftp4,\r
   IN   CONST CHAR8          *FilePath,\r
 GetFileSize (\r
   IN   EFI_MTFTP4_PROTOCOL  *Mtftp4,\r
   IN   CONST CHAR8          *FilePath,\r
@@ -175,8 +175,8 @@ GetFileSize (
                                  (see EFI_MTFTP4_PROTOCOL.ReadFile() status codes).\r
 \r
 **/\r
                                  (see EFI_MTFTP4_PROTOCOL.ReadFile() status codes).\r
 \r
 **/\r
-STATIC \r
-EFI_STATUS \r
+STATIC\r
+EFI_STATUS\r
 DownloadFile (\r
   IN   EFI_MTFTP4_PROTOCOL  *Mtftp4,\r
   IN   CONST CHAR16         *FilePath,\r
 DownloadFile (\r
   IN   EFI_MTFTP4_PROTOCOL  *Mtftp4,\r
   IN   CONST CHAR16         *FilePath,\r
@@ -198,8 +198,8 @@ DownloadFile (
   @retval  EFI_SUCCESS  All packets are accepted.\r
 \r
 **/\r
   @retval  EFI_SUCCESS  All packets are accepted.\r
 \r
 **/\r
-STATIC \r
-EFI_STATUS \r
+STATIC\r
+EFI_STATUS\r
 EFIAPI\r
 CheckPacket (\r
   IN EFI_MTFTP4_PROTOCOL  *This,\r
 EFIAPI\r
 CheckPacket (\r
   IN EFI_MTFTP4_PROTOCOL  *This,\r
@@ -623,7 +623,7 @@ StringToUint16 (
   @param[in]   NicNumber         The network physical device number.\r
   @param[out]  NicName           Address where to store the NIC name.\r
                                  The memory area has to be at least\r
   @param[in]   NicNumber         The network physical device number.\r
   @param[out]  NicName           Address where to store the NIC name.\r
                                  The memory area has to be at least\r
-                                 IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH \r
+                                 IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH\r
                                  double byte wide.\r
 \r
   @return  EFI_SUCCESS  The name of the NIC was returned.\r
                                  double byte wide.\r
 \r
   @return  EFI_SUCCESS  The name of the NIC was returned.\r