From 3dd405becfcfe5867881d311f5fb492f24378fac Mon Sep 17 00:00:00 2001 From: rsun3 Date: Tue, 16 Mar 2010 06:22:05 +0000 Subject: Fix a bug in SetupBrowserDxe driver when check current user's access setup permission. EFI_USER_INFO_ACCESS_CONTROL.Size may be equal to sizeof (EFI_USER_INFO_ACCESS_CONTROL) because of no extra data. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10254 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/SetupBrowserDxe/Expression.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c index 45ec96edf1..710eafca5c 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c @@ -1528,7 +1528,7 @@ CheckUserPrivilege ( RemainSize = UserInfo->InfoSize - sizeof (EFI_USER_INFO); AccessControl = (EFI_USER_INFO_ACCESS_CONTROL *)(UserInfo + 1); while (RemainSize >= sizeof (EFI_USER_INFO_ACCESS_CONTROL)) { - if (RemainSize < AccessControl->Size || AccessControl->Size <= sizeof (EFI_USER_INFO_ACCESS_CONTROL)) { + if (RemainSize < AccessControl->Size || AccessControl->Size < sizeof (EFI_USER_INFO_ACCESS_CONTROL)) { break; } if (AccessControl->Type == EFI_USER_INFO_ACCESS_SETUP) { -- cgit v1.2.3