Add check when use *Pointer as Sd->mRight[*Pointer] to avoid out of Array bound.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7382 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -226,11 +226,13 @@ MakeTable (
|
|||||||
*Pointer = Avail++;
|
*Pointer = Avail++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (*Pointer < (2 * NC - 1)) {
|
||||||
if ((Index3 & Mask) != 0) {
|
if ((Index3 & Mask) != 0) {
|
||||||
Pointer = &Sd->mRight[*Pointer];
|
Pointer = &Sd->mRight[*Pointer];
|
||||||
} else {
|
} else {
|
||||||
Pointer = &Sd->mLeft[*Pointer];
|
Pointer = &Sd->mLeft[*Pointer];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Index3 <<= 1;
|
Index3 <<= 1;
|
||||||
Index--;
|
Index--;
|
||||||
|
Reference in New Issue
Block a user