]> git.baikalelectronics.ru Git - kernel.git/commit
hpsa: fix an sprintf() overflow in the reset handler
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 4 Jun 2015 14:47:56 +0000 (17:47 +0300)
committerJames Bottomley <JBottomley@Odin.com>
Thu, 30 Jul 2015 20:11:40 +0000 (13:11 -0700)
commit5d09a46f644a22940dbb6aa3b8b1e6e53a771231
tree297d84999ec3e49cf52476bac2f6228efd39022a
parent931d1ffa15484954a4b6f671ded3884a0e6539c1
hpsa: fix an sprintf() overflow in the reset handler

The string "cmd %d RESET FAILED, new lockup detected" is not quite
large enough so the sprintf() will overflow.  I have increased the size
of the buffer and also changed the sprintf calls to snprintf.

Fixes: dbf6d0cd8bc6 ('hpsa: use block layer tag for command allocation')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/hpsa.c