commit 868145d87bd058f271921c69519d4e2311171d28
Author: Matthew Wilcox <[EMAIL PROTECTED]>
Date:   Fri Mar 21 15:15:03 2008 +0000

    SCSI advansys: Fix bug in AdvLoadMicrocode
    
    commit: 951b62c11e86acf8c55d9828aa8c921575023c29
    
    buf[i] can be up to 0xfd, so doubling it and assigning the result to an
    unsigned char truncates the value.  Just use an unsigned int instead;
    it's only a temporary.
    
    Signed-off-by: Matthew Wilcox <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
    Signed-off-by: Chris Wright <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index ce8ccb0..f40417b 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -6439,7 +6439,7 @@ static int AdvLoadMicrocode(AdvPortAddr iop_base, 
unsigned char *buf, int size,
                        i += 2;
                        len += 2;
                } else {
-                       unsigned char off = buf[i] * 2;
+                       unsigned int off = buf[i] * 2;
                        unsigned short word = (buf[off + 1] << 8) | buf[off];
                        AdvWriteWordAutoIncLram(iop_base, word);
                        len += 2;
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to