Skip to content

Commit

Permalink
wavelan: avoid index past end of array if DEBUG_SHOW_UNUSED is defined
Browse files Browse the repository at this point in the history
Reported by Daniel Marjamäki <danielm77@spray.se> here:

	http://bugzilla.kernel.org/show_bug.cgi?id=10588

Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
John W. Linville committed May 13, 2008
1 parent bb55bdd commit d5251ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/wavelan.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,9 +908,9 @@ static void wv_psa_show(psa_t * p)
p->psa_call_code[3], p->psa_call_code[4], p->psa_call_code[5],
p->psa_call_code[6], p->psa_call_code[7]);
#ifdef DEBUG_SHOW_UNUSED
printk(KERN_DEBUG "psa_reserved[]: %02X:%02X:%02X:%02X\n",
printk(KERN_DEBUG "psa_reserved[]: %02X:%02X\n",
p->psa_reserved[0],
p->psa_reserved[1], p->psa_reserved[2], p->psa_reserved[3]);
p->psa_reserved[1]);
#endif /* DEBUG_SHOW_UNUSED */
printk(KERN_DEBUG "psa_conf_status: %d, ", p->psa_conf_status);
printk("psa_crc: 0x%02x%02x, ", p->psa_crc[0], p->psa_crc[1]);
Expand Down
6 changes: 2 additions & 4 deletions drivers/net/wireless/wavelan_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1074,11 +1074,9 @@ wv_psa_show(psa_t * p)
p->psa_call_code[6],
p->psa_call_code[7]);
#ifdef DEBUG_SHOW_UNUSED
printk(KERN_DEBUG "psa_reserved[]: %02X:%02X:%02X:%02X\n",
printk(KERN_DEBUG "psa_reserved[]: %02X:%02X\n",
p->psa_reserved[0],
p->psa_reserved[1],
p->psa_reserved[2],
p->psa_reserved[3]);
p->psa_reserved[1]);
#endif /* DEBUG_SHOW_UNUSED */
printk(KERN_DEBUG "psa_conf_status: %d, ", p->psa_conf_status);
printk("psa_crc: 0x%02x%02x, ", p->psa_crc[0], p->psa_crc[1]);
Expand Down

0 comments on commit d5251ae

Please sign in to comment.