mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
852d891191
commit
3dd405becf
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue