diff options
Diffstat (limited to 'EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOut.c')
-rw-r--r-- | EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOut.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOut.c b/EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOut.c index 32944a8d9d..2a15f23771 100644 --- a/EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOut.c +++ b/EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOut.c @@ -504,6 +504,9 @@ OutputString ( Size = StrLen (String) + 1;
OutputString = AllocatePool (Size);
+ if (OutputString == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
// If there is any non-ascii characters in String buffer then replace it with '?'
// Eventually, UnicodeStrToAsciiStr API should be fixed.
|