[PATCH 33/42] nds/libnds/source/arm7/clock.c: Avoid over indexing array

Joel Sherrill joel.sherrill at oarcorp.com
Mon Mar 23 14:39:31 UTC 2015


---
 c/src/lib/libbsp/arm/nds/libnds/source/arm7/clock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/src/lib/libbsp/arm/nds/libnds/source/arm7/clock.c b/c/src/lib/libbsp/arm/nds/libnds/source/arm7/clock.c
index b7024f3..bd75197 100644
--- a/c/src/lib/libbsp/arm/nds/libnds/source/arm7/clock.c
+++ b/c/src/lib/libbsp/arm/nds/libnds/source/arm7/clock.c
@@ -171,7 +171,7 @@ void rtcGetTimeAndDate(uint8 * time) {
 //---------------------------------------------------------------------------------
 void rtcSetTimeAndDate(uint8 * time) {
 //---------------------------------------------------------------------------------
-	uint8 command[8];
+	uint8 command[8 + 1];
 
 	int i;
 	for ( i=0; i< 8; i++ ) {
-- 
1.9.3




More information about the devel mailing list