enhanced security check.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7509 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2009-02-12 06:05:08 +00:00
parent 7c1bc8d656
commit df80a83c8a
2 changed files with 10 additions and 0 deletions

View File

@ -973,6 +973,11 @@ ConstructConfigHdr (
CHAR16 *StrPtr;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
//
// Make sure
//
ASSERT (!(ConfigHdr == NULL && *StrBufferLen != 0));
if (Name == NULL) {
//
// There will be no "NAME" in <ConfigHdr> for Name/Value storage

View File

@ -866,6 +866,7 @@ EfiKeyFiFoInsertOneKey (
UINT8 Tail;
Tail = TerminalDevice->EfiKeyFiFo->Tail;
ASSERT (Tail < FIFO_MAX_NUMBER + 1);
if (IsEfiKeyFiFoFull (TerminalDevice)) {
//
@ -900,6 +901,7 @@ EfiKeyFiFoRemoveOneKey (
UINT8 Head;
Head = TerminalDevice->EfiKeyFiFo->Head;
ASSERT (Head < FIFO_MAX_NUMBER + 1);
if (IsEfiKeyFiFoEmpty (TerminalDevice)) {
//
@ -986,6 +988,8 @@ UnicodeFiFoInsertOneKey (
UINT8 Tail;
Tail = TerminalDevice->UnicodeFiFo->Tail;
ASSERT (Tail < FIFO_MAX_NUMBER + 1);
if (IsUnicodeFiFoFull (TerminalDevice)) {
//
@ -1020,6 +1024,7 @@ UnicodeFiFoRemoveOneKey (
UINT8 Head;
Head = TerminalDevice->UnicodeFiFo->Head;
ASSERT (Head < FIFO_MAX_NUMBER + 1);
if (IsUnicodeFiFoEmpty (TerminalDevice)) {
//