X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FUefiLib%2FConsole.c;h=4fbdef73504daa5d0eb6097437e3487a9a47fcce;hb=a3657e3e7aaaccb1b9ea1b41a72d4564452e272d;hp=d06b0a932dee45ceae2d5f0bdba2bd462f3513b9;hpb=d05003bed6b96ad51fbf5d9b7b6c2897e6228245;p=mirror_edk2.git diff --git a/MdePkg/Library/UefiLib/Console.c b/MdePkg/Library/UefiLib/Console.c index d06b0a932d..4fbdef7350 100644 --- a/MdePkg/Library/UefiLib/Console.c +++ b/MdePkg/Library/UefiLib/Console.c @@ -263,6 +263,10 @@ UnicodeStringDisplayLength ( UINTN Length; UINTN Width; + if (String == NULL) { + return 0; + } + Length = 0; while (*String != 0) { Width = GetGlyphWidth (*String);