]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c
IntelFsp2WrapperPkg/FspmWrapperPeim: Update debug message match code.
[mirror_edk2.git] / ShellPkg / Library / UefiShellTftpCommandLib / Tftp.c
index 4bb21aae6fb67ba333a9b5e28a5adf5c8612eee6..831b9c3d0250c342a4c19ee0073d5be65fe90981 100644 (file)
@@ -341,6 +341,7 @@ ShellCommandRunTftp (
   }\r
 \r
   RemoteFilePath = ShellCommandLineGetRawValue (CheckPackage, 2);\r
+  ASSERT(RemoteFilePath != NULL);\r
   AsciiRemoteFilePath = AllocatePool (\r
                           (StrLen (RemoteFilePath) + 1) * sizeof (CHAR8)\r
                           );\r
@@ -955,6 +956,7 @@ CheckPacket (
   UINTN             Index;\r
   UINTN             LastStep;\r
   UINTN             Step;\r
+  EFI_STATUS        Status;\r
 \r
   if ((NTOHS (Packet->OpCode)) != EFI_MTFTP4_OPCODE_DATA) {\r
     return EFI_SUCCESS;\r
@@ -984,7 +986,10 @@ CheckPacket (
 \r
   ShellPrintEx (-1, -1, L"%s", mTftpProgressDelete);\r
 \r
-  StrCpy (Progress, mTftpProgressFrame);\r
+  Status = StrCpyS (Progress, TFTP_PROGRESS_MESSAGE_SIZE, mTftpProgressFrame);\r
+  if (EFI_ERROR(Status)) {\r
+    return Status;\r
+  }\r
   for (Index = 1; Index < Step; Index++) {\r
     Progress[Index] = L'=';\r
   }\r