diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-01-08 08:15:44 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-01-08 08:15:44 +0000 |
commit | b7d3c63160fae758c1d0467caeecad169c733338 (patch) | |
tree | fe65218b0a56b7adda036f6f7ebd55cfc9d907ad | |
parent | 06579057489bbdeabc422e49c3a03474ddfb81cf (diff) | |
download | edk2-platforms-b7d3c63160fae758c1d0467caeecad169c733338.tar.xz |
fixed one bug when calculate the string length.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4524 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c index e56aa156d5..7cdbddc32d 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c @@ -305,16 +305,16 @@ Mtftp4SendRequest ( Packet->OpCode = HTONS (Instance->Operation);
Cur = Packet->Rrq.Filename;
Cur = (UINT8 *) AsciiStrCpy ((CHAR8 *) Cur, (CHAR8 *) Token->Filename);
- Cur += AsciiStrLen ((CHAR8 *) Token->Filename);
+ Cur += AsciiStrLen ((CHAR8 *) Token->Filename) + 1;
Cur = (UINT8 *) AsciiStrCpy ((CHAR8 *) Cur, (CHAR8 *) Mode);
- Cur += AsciiStrLen ((CHAR8 *) Mode);
+ Cur += AsciiStrLen ((CHAR8 *) Mode) + 1;
for (Index = 0; Index < Token->OptionCount; ++Index) {
Cur = (UINT8 *) AsciiStrCpy ((CHAR8 *) Cur, (CHAR8 *) Options[Index].OptionStr);
- Cur += AsciiStrLen ((CHAR8 *) Options[Index].OptionStr);
+ Cur += AsciiStrLen ((CHAR8 *) Options[Index].OptionStr) + 1;
Cur = (UINT8 *) AsciiStrCpy ((CHAR8 *) Cur, (CHAR8 *) Options[Index].ValueStr);
- Cur += AsciiStrLen ((CHAR8 *) (CHAR8 *) Options[Index].ValueStr);
+ Cur += AsciiStrLen ((CHAR8 *) (CHAR8 *) Options[Index].ValueStr) + 1;
}
return Mtftp4SendPacket (Instance, Nbuf);
|