]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
Should pass in bytes of string buffer to UnicodeSPrint() rather than Unicode string...
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Expression.c
index 27be635e9c7c1b6e21b0c07e530c044564585a8b..1a47f2b0a901c063f46e6dc3a9edc829113b02ab 100644 (file)
@@ -1071,7 +1071,7 @@ IfrToString (
       CopyMem (TmpBuf, Value.Buffer, Value.BufferLen * sizeof (CHAR16));\r
       PrintFormat = L"%s";  \r
     }\r
-    UnicodeSPrint (Buffer, MAXIMUM_VALUE_CHARACTERS, PrintFormat, Value.Buffer);  \r
+    UnicodeSPrint (Buffer, sizeof (Buffer), PrintFormat, Value.Buffer);  \r
     String = Buffer; \r
     FreePool (TmpBuf);\r
     FreePool (Value.Buffer);\r