From e1f3583409e7fa5041be829440f0139b1a70c3c4 Mon Sep 17 00:00:00 2001 From: "Zhang, Chao B" Date: Fri, 1 Jul 2016 10:32:27 +0800 Subject: 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 Reviewed-by: Yao Jiewen Reviewed-by: Chao Zhang --- SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c') diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c index bdff5bd..7720c27 100644 --- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c +++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c @@ -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; } -- cgit v1.1