add security check.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8819 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2009-07-08 09:42:16 +00:00
parent 32d4a8efb9
commit 890986ca2a
8 changed files with 9 additions and 31 deletions

View File

@@ -1,8 +1,8 @@
/** @file
Implementation of reading and writing operations on the NVRAM device
attached to a network interface.
Implementation of reading and writing operations on the NVRAM device
attached to a network interface.
Copyright (c) 2004 - 2007, Intel Corporation. <BR>
Copyright (c) 2004 - 2009, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials are licensed
and made available under the terms and conditions of the BSD License which
accompanies this distribution. The full text of the license may be found at
@@ -88,6 +88,8 @@ PxeNvDataRead (
return EFI_DEVICE_ERROR;
}
ASSERT ((Offset + BufferSize) <= sizeof (Db->Data));
CopyMem (Buffer, Db->Data.Byte + Offset, BufferSize);
return EFI_SUCCESS;