Initialize the local variable before refer to them.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10577 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -155,7 +155,7 @@ GlueMakeTable (
|
||||
//
|
||||
// TableBits should not be greater than 16.
|
||||
//
|
||||
if (TableBits >= (sizeof (Count)/sizeof (UINT16))) {
|
||||
if (TableBits > 16) {
|
||||
return (UINT16) BAD_TABLE;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ GlueMakeTable (
|
||||
//
|
||||
// Count array index should not be greater than or equal to its size.
|
||||
//
|
||||
if (BitLen[Index] < (sizeof (Count)/sizeof (UINT16))) {
|
||||
if (BitLen[Index] <= 16) {
|
||||
Count[BitLen[Index]]++;
|
||||
} else {
|
||||
return (UINT16) BAD_TABLE;
|
||||
|
Reference in New Issue
Block a user