diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-12 06:05:08 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-12 06:05:08 +0000 |
commit | df80a83c8a5a45a979c6dfa4a54f7aafbde5a671 (patch) | |
tree | bd2aa82256285ce7fcd4cf452ce89a7b4aa90b3a /MdeModulePkg/Universal/Console | |
parent | 7c1bc8d656de89128962f95ef5e9a910d241d01b (diff) | |
download | edk2-platforms-df80a83c8a5a45a979c6dfa4a54f7aafbde5a671.tar.xz |
enhanced security check.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7509 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console')
-rw-r--r-- | MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index b0d10d1dc5..4aa8c73f06 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -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)) {
//
|