fru: fixup array bounds checking

Fixup the following array bounds checking bugs:
[lib/ipmi_fru.c:1003]: (style) Array index 'i' is
used before limits check.
[lib/ipmi_fru.c:1127]: (style) Array index 'i' is
used before limits check.
[lib/ipmi_fru.c:1262]: (style) Array index 'i' is
used before limits check.

Signed-off-by: Patrick Venture <venture@google.com>
This commit is contained in:
Patrick Venture
2018-11-26 12:38:04 -08:00
committed by Alexander Amelkin
parent 7941806a9b
commit 6d515dd06b
2 changed files with 5 additions and 6 deletions

View File

@@ -42,6 +42,8 @@
# include <config.h>
#endif
#define FRU_END_OF_FIELDS 0xc1
#define GET_FRU_INFO 0x10
#define GET_FRU_DATA 0x11
#define SET_FRU_DATA 0x12