mirror of https://github.com/acidanthera/audk.git
NetworkPkg: Fix assert caused by wrong parameter in AsciiStrCpyS()
The 2nd parameter in AsciiStrCpyS() should be the max available memory of the destination. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18161 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a3f28ac92c
commit
b89ef37122
|
@ -602,7 +602,7 @@ Mtftp6SendError (
|
|||
TftpError->OpCode = HTONS (EFI_MTFTP6_OPCODE_ERROR);
|
||||
TftpError->Error.ErrorCode = HTONS (ErrCode);
|
||||
|
||||
AsciiStrCpyS ((CHAR8 *) TftpError->Error.ErrorMessage, sizeof (TftpError->Error.ErrorMessage) / sizeof (TftpError->Error.ErrorMessage[0]), (CHAR8 *) ErrInfo);
|
||||
AsciiStrCpyS ((CHAR8 *) TftpError->Error.ErrorMessage, AsciiStrLen ((CHAR8 *) ErrInfo) + 1 , (CHAR8 *) ErrInfo);
|
||||
|
||||
//
|
||||
// Save the packet buf for retransmit
|
||||
|
|
Loading…
Reference in New Issue