Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1217
Local variable 'Mtftp4Token' might be uninitialized when error happen. This patch is to
resolve the issue.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Carsey Jaben <jaben.carsey@intel.com>
Cc: Zeng Star <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
UINT8 BlksizeBuf[10];\r
UINT8 WindowsizeBuf[10];\r
\r
+ ZeroMem (&Mtftp4Token, sizeof (EFI_MTFTP4_TOKEN));\r
+\r
// Downloaded file can be large. BS.AllocatePages() is more faster\r
// than AllocatePool() and avoid fragmentation.\r
// The downloaded file could be an EFI application. Marking the\r
TftpContext->DownloadedNbOfBytes = 0;\r
TftpContext->LastReportedNbOfBytes = 0;\r
\r
- ZeroMem (&Mtftp4Token, sizeof (EFI_MTFTP4_TOKEN));\r
Mtftp4Token.Filename = (UINT8*)AsciiFilePath;\r
Mtftp4Token.BufferSize = FileSize;\r
Mtftp4Token.Buffer = Buffer;\r