mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-22 13:14:26 +02:00
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
|
// 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) {
|
if (Hsti->ImplementationID[Index] == 0) {
|
||||||
break;
|
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"));
|
DEBUG ((EFI_D_ERROR, "ImplementationID is no NUL CHAR\n"));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user