[coreboot-gerrit] Patch set updated for coreboot: 3559f45 dmp/vortex86ex/southbridge.c: Do not access arrays out of bound
Daniele Forsi (dforsi@gmail.com)
gerrit at coreboot.org
Sat Jul 26 12:25:37 CEST 2014
Daniele Forsi (dforsi at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6375
-gerrit
commit 3559f453692a1a3708aead08075817c6ce5d5ff8
Author: Daniele Forsi <dforsi at gmail.com>
Date: Sat Jul 26 11:17:03 2014 +0200
dmp/vortex86ex/southbridge.c: Do not access arrays out of bound
Found by Cppcheck 1.65. Fixes:
[src/southbridge/dmp/vortex86ex/southbridge.c:498]: (error) Array 'rtc[7]' accessed at index 7, which is out of bounds.
[src/southbridge/dmp/vortex86ex/southbridge.c:498]: (error) Array 'bin_rtc[7]' accessed at index 7, which is out of bounds.
Change-Id: I8939fe1b326202bbe2784639b0e591f8ee470eeb
Signed-off-by: Daniele Forsi <dforsi at gmail.com>
---
src/southbridge/dmp/vortex86ex/southbridge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/southbridge/dmp/vortex86ex/southbridge.c b/src/southbridge/dmp/vortex86ex/southbridge.c
index b9432f0..a2b1246 100644
--- a/src/southbridge/dmp/vortex86ex/southbridge.c
+++ b/src/southbridge/dmp/vortex86ex/southbridge.c
@@ -494,7 +494,7 @@ static void fix_cmos_rtc_time(void)
/* Convert RTC from BCD format to binary. */
u8 bin_rtc[7];
int i;
- for (i = 0; i < 8; i++) {
+ for (i = 0; i < 7; i++) {
bin_rtc[i] = bcd2dec(rtc[i]);
}
More information about the coreboot-gerrit
mailing list