mirror of https://github.com/acidanthera/audk.git
Resolve buffer check overrun issue.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Qiu, Shumin" <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16637 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a61b07f464
commit
57ce74ac5f
|
@ -200,12 +200,12 @@ InternalHstiIsValidTable (
|
|||
//
|
||||
// Check ImplementationID
|
||||
//
|
||||
for (Index = 0; Index < sizeof(Hsti->ImplementationID); Index++) {
|
||||
for (Index = 0; Index < sizeof(Hsti->ImplementationID)/sizeof(Hsti->ImplementationID[0]); Index++) {
|
||||
if (Hsti->ImplementationID[Index] == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Index == sizeof(Hsti->ImplementationID)) {
|
||||
if (Index == sizeof(Hsti->ImplementationID)/sizeof(Hsti->ImplementationID[0])) {
|
||||
DEBUG ((EFI_D_ERROR, "ImplementationID is no NUL CHAR\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue