Revision: 16747
http://sourceforge.net/p/edk2/code/16747
Author: vanjeff
Date: 2015-02-04 08:31:14 +0000 (Wed, 04 Feb 2015)
Log Message:
-----------
Resolve buffer check overrun issue.
(Sync patch r16637 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <[email protected]>
Reviewed-by: "Qiu, Shumin" <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/16637
Modified Paths:
--------------
branches/UDK2014.SP1/MdePkg/Library/DxeHstiLib/HstiDxe.c
Modified: branches/UDK2014.SP1/MdePkg/Library/DxeHstiLib/HstiDxe.c
===================================================================
--- branches/UDK2014.SP1/MdePkg/Library/DxeHstiLib/HstiDxe.c 2015-02-04
08:30:31 UTC (rev 16746)
+++ branches/UDK2014.SP1/MdePkg/Library/DxeHstiLib/HstiDxe.c 2015-02-04
08:31:14 UTC (rev 16747)
@@ -200,12 +200,12 @@
//
// 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;
}
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits