Hi,
I checked EDK2 sources with cppcheck program and found this mistake
edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c:line582
------
for (OptionIndex = 0; (OptionOrder[OptionIndex] != 0 && OptionIndex <
MAX_MENU_NUMBER); OptionIndex++) {
------
Warning said
---
The variable 'OptionIndex' is used as an array index before it is checked that
is within limits. This can mean that the array might be accessed out of bounds.
Reorder conditions such as '(a[i] && i < 10)' to '(i < 10 && a[i])'. That way
the array will not be accessed if the index is out of limits.
---
I agree, the line should be
------
for (OptionIndex = 0; (OptionIndex < MAX_MENU_NUMBER &&
OptionOrder[OptionIndex] != 0); OptionIndex++) {
------
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: [email protected]
Wishes,
Sergey------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel