]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiLib/Console.c
MemoryAllocationLib: For boundary case: “AllocationSize + OverAllocationSize >= 4G”
[mirror_edk2.git] / MdePkg / Library / UefiLib / Console.c
index d06b0a932dee45ceae2d5f0bdba2bd462f3513b9..4fbdef73504daa5d0eb6097437e3487a9a47fcce 100644 (file)
@@ -263,6 +263,10 @@ UnicodeStringDisplayLength (
   UINTN      Length;\r
   UINTN      Width;\r
 \r
+  if (String == NULL) {\r
+    return 0;\r
+  }\r
+\r
   Length = 0;\r
   while (*String != 0) {\r
     Width = GetGlyphWidth (*String);\r