]> err.no Git - linux-2.6/commitdiff
wavelan: avoid index past end of array if DEBUG_SHOW_UNUSED is defined
authorJohn W. Linville <linville@tuxdriver.com>
Fri, 2 May 2008 13:56:34 +0000 (09:56 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 May 2008 01:18:05 +0000 (21:18 -0400)
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>
drivers/net/wireless/wavelan.c
drivers/net/wireless/wavelan_cs.c

index 03384a43186b3470d81744e7f75ee584e4fe57ce..49ae970039524bea6dd6e47c173045f49c01f60c 100644 (file)
@@ -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]);
index baf74015751c4cb04c3ad5b4940db68bb04080b6..b584c0ecc62d1eeb191d6d5443eb34ec650b242d 100644 (file)
@@ -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]);