git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9750
6f19259b-4bc3-4df7-8a09-
765794883524
-Copyright (c) 2006 - 2009, Intel Corporation \r
+Copyright (c) 2006 - 2010, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
+ if ((Width < 0) || (Width >= EfiCpuIoWidthMaximum)) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
Status = CpuIoCheckAddressRange (Width, Address, Count, Buffer, IA32_MAX_MEM_ADDRESS);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
Status = CpuIoCheckAddressRange (Width, Address, Count, Buffer, IA32_MAX_MEM_ADDRESS);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
+ if ((Width < 0) || (Width >= EfiCpuIoWidthMaximum)) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
Status = CpuIoCheckAddressRange (Width, Address, Count, Buffer, IA32_MAX_MEM_ADDRESS);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
Status = CpuIoCheckAddressRange (Width, Address, Count, Buffer, IA32_MAX_MEM_ADDRESS);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
\r
Address = (UINTN) UserAddress;\r
\r
\r
Address = (UINTN) UserAddress;\r
\r
- if (Width >= EfiCpuIoWidthMaximum) {\r
+ if ((Width < 0) || (Width >= EfiCpuIoWidthMaximum)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
Address = (UINTN) UserAddress;\r
\r
\r
Address = (UINTN) UserAddress;\r
\r
- if (Width >= EfiCpuIoWidthMaximum) {\r
+ if ((Width < 0) || (Width >= EfiCpuIoWidthMaximum)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r