summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Console
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/Console')
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c5
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)) {
//