diff options
author | Nils Wallménius <nils@rockbox.org> | 2009-08-06 19:02:59 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2009-08-06 19:02:59 +0000 |
commit | c80f6dad303da248d7fe7d1acbe5916a06e3f73d (patch) | |
tree | bb9c1918c50266e4368ed53926b17daea9c2a3ea | |
parent | 2cab3116356e377fe0c3073ce679b69478553565 (diff) | |
download | rockbox-c80f6dad303da248d7fe7d1acbe5916a06e3f73d.tar.gz rockbox-c80f6dad303da248d7fe7d1acbe5916a06e3f73d.zip |
Fix out of bounds accesses in keybox and matrix
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22191 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/keybox.c | 2 | ||||
-rw-r--r-- | apps/plugins/matrix.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index 448050938f..6c59470fa4 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c @@ -182,7 +182,7 @@ static void add_entry(int selected_item) for (i = 0; i < MAX_ENTRIES && pw_list.entries[i].used; i++) ; - if (pw_list.entries[i].used) + if (MAX_ENTRIES == i) { rb->splash(HZ, "Password list full"); return; diff --git a/apps/plugins/matrix.c b/apps/plugins/matrix.c index 84a333e1fb..12ec4e9093 100644 --- a/apps/plugins/matrix.c +++ b/apps/plugins/matrix.c @@ -283,7 +283,7 @@ static void matrix_loop(void) if (i > ROWS) { matrix[z][j].val = 129; - matrix[ROWS][j].bold = 1; + matrix[ROWS - 1][j].bold = 1; matrix_blit_char(z - 1, j, matrix[z][j].val); continue; } |