diff options
-rw-r--r-- | MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrForm.c | 5 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrForm.c b/MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrForm.c index 1584c33d92..a81423763b 100644 --- a/MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrForm.c +++ b/MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrForm.c @@ -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
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)) {
//
|