ArmPkg/Gic: Fix boundary checking bug

mGicNumInterrupts is the total number of interrupts, so the interrupt
ID equal to mGicNumInterrupts is also invalid.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
Heyi Guo
2016-04-23 22:39:59 +08:00
committed by Ard Biesheuvel
parent fa8ee0ad6d
commit 599f004b27
3 changed files with 9 additions and 9 deletions

View File

@@ -62,7 +62,7 @@ RegisterInterruptSource (
IN HARDWARE_INTERRUPT_HANDLER Handler
)
{
if (Source > mGicNumInterrupts) {
if (Source >= mGicNumInterrupts) {
ASSERT(FALSE);
return EFI_UNSUPPORTED;
}