The updated Length value should be returned
for EFI_BUFFER_TOO_SMALL case.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
SmmLockBoxHandler(), SmmLockBoxRestore(), SmmLockBoxUpdate(), SmmLockBoxSave()\r
will receive untrusted input and do basic validation.\r
\r
SmmLockBoxHandler(), SmmLockBoxRestore(), SmmLockBoxUpdate(), SmmLockBoxSave()\r
will receive untrusted input and do basic validation.\r
\r
-Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
(VOID *)(UINTN)TempLockBoxParameterRestore.Buffer,\r
(UINTN *)&TempLockBoxParameterRestore.Length\r
);\r
(VOID *)(UINTN)TempLockBoxParameterRestore.Buffer,\r
(UINTN *)&TempLockBoxParameterRestore.Length\r
);\r
+ if (Status == EFI_BUFFER_TOO_SMALL) {\r
+ LockBoxParameterRestore->Length = TempLockBoxParameterRestore.Length;\r
+ }\r
}\r
LockBoxParameterRestore->Header.ReturnStatus = (UINT64)Status;\r
return ;\r
}\r
LockBoxParameterRestore->Header.ReturnStatus = (UINT64)Status;\r
return ;\r