mirror of https://github.com/acidanthera/audk.git
SecurityPkg/Tcg: Fix bug that prevented SubmitCommand buffers from being Max size
SubmitCommand() was checking the buffer size for ">=" Max size. This would cause code to fail with "EFI_INVALID_PARAMETER" if a buffer was passed that was the "max" size as indicated by the GetCapability() command. Change to ">" to allow for maximum buffer size. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bret Barkelew <brbarkel@microsoft.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
This commit is contained in:
parent
1d9869f9e9
commit
e1f3583409
|
@ -1330,10 +1330,10 @@ Tcg2SubmitCommand (
|
|||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
if (InputParameterBlockSize >= mTcgDxeData.BsCap.MaxCommandSize) {
|
||||
if (InputParameterBlockSize > mTcgDxeData.BsCap.MaxCommandSize) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
if (OutputParameterBlockSize >= mTcgDxeData.BsCap.MaxResponseSize) {
|
||||
if (OutputParameterBlockSize > mTcgDxeData.BsCap.MaxResponseSize) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
|
|
@ -893,10 +893,10 @@ TreeSubmitCommand (
|
|||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if (InputParameterBlockSize >= mTcgDxeData.BsCap.MaxCommandSize) {
|
||||
if (InputParameterBlockSize > mTcgDxeData.BsCap.MaxCommandSize) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
if (OutputParameterBlockSize >= mTcgDxeData.BsCap.MaxResponseSize) {
|
||||
if (OutputParameterBlockSize > mTcgDxeData.BsCap.MaxResponseSize) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue