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:
Yao, Jiewen 2015-01-22 03:29:17 +00:00 committed by jyao1
parent a61b07f464
commit 57ce74ac5f
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}