add security check.

update functions comments.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8832 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2009-07-09 08:54:39 +00:00
parent 220c61c1ee
commit 7b0ae7e82a
6 changed files with 23 additions and 15 deletions

View File

@@ -88,9 +88,9 @@ PxeNvDataRead (
return EFI_DEVICE_ERROR;
}
ASSERT ((Offset + BufferSize) <= sizeof (Db->Data));
ASSERT (Offset < sizeof (Db->Data));
CopyMem (Buffer, Db->Data.Byte + Offset, BufferSize);
CopyMem (Buffer, &Db->Data.Byte[Offset], BufferSize);
return EFI_SUCCESS;
}