Skip to content

Commit

Permalink
[IA64] Do not go beyond ARRAY_SIZE of unw.hash
Browse files Browse the repository at this point in the history
static struct {

... :114
        unsigned short hash[UNW_HASH_SIZE];

... :2152
	for (index = 0; index <= UNW_HASH_SIZE; ++index) {

This is a bug, isn't it?

s/<=/</

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Roel Kluin authored and Tony Luck committed Feb 25, 2009
1 parent 6b1ff03 commit aa2f63c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/ia64/kernel/unwind.c
Original file line number Diff line number Diff line change
Expand Up @@ -2149,7 +2149,7 @@ unw_remove_unwind_table (void *handle)

/* next, remove hash table entries for this table */

for (index = 0; index <= UNW_HASH_SIZE; ++index) {
for (index = 0; index < UNW_HASH_SIZE; ++index) {
tmp = unw.cache + unw.hash[index];
if (unw.hash[index] >= UNW_CACHE_SIZE
|| tmp->ip < table->start || tmp->ip >= table->end)
Expand Down

0 comments on commit aa2f63c

Please sign in to comment.