mirror of https://github.com/acidanthera/audk.git
fix the problem that data type conversion may loss data.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17886 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
01267e224b
commit
e0f74cea66
|
@ -328,11 +328,11 @@ Mtftp4SendRequest (
|
|||
for (Index = 0; Index < Token->OptionCount; ++Index) {
|
||||
Cur = (UINT8 *) AsciiStrCpyS ((CHAR8 *) Cur, Len, (CHAR8 *) Options[Index].OptionStr);
|
||||
Cur += AsciiStrLen ((CHAR8 *) Options[Index].OptionStr) + 1;
|
||||
Len -= (AsciiStrLen ((CHAR8 *) Options[Index].OptionStr) + 1);
|
||||
Len -= (UINT32) AsciiStrLen ((CHAR8 *) Options[Index].OptionStr) + 1;
|
||||
|
||||
Cur = (UINT8 *) AsciiStrCpyS ((CHAR8 *) Cur, Len, (CHAR8 *) Options[Index].ValueStr);
|
||||
Cur += AsciiStrLen ((CHAR8 *) (CHAR8 *) Options[Index].ValueStr) + 1;
|
||||
Len -= (AsciiStrLen ((CHAR8 *) (CHAR8 *) Options[Index].ValueStr) + 1);
|
||||
Len -= (UINT32) AsciiStrLen ((CHAR8 *) (CHAR8 *) Options[Index].ValueStr) + 1;
|
||||
}
|
||||
|
||||
return Mtftp4SendPacket (Instance, Nbuf);
|
||||
|
|
Loading…
Reference in New Issue