]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] advansys: Fix bug in AdvLoadMicrocode
authorMatthew Wilcox <matthew@wil.cx>
Fri, 5 Oct 2007 19:57:06 +0000 (15:57 -0400)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 7 Mar 2008 16:05:43 +0000 (10:05 -0600)
commitb4561b1288db3c850ca872589b72e6a454e19d53
treef9caeba567b96d05d22af36a4076bcf81133c897
parent1eae20793af4e9a1c11d37f78ae6032abf30e640
[SCSI] advansys: Fix bug in AdvLoadMicrocode

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 <willy@linux.intel.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/advansys.c