Hello Bradley Grove,

The patch 17adeb6dabbe: "[SCSI] esas2r: ATTO Technology ExpressSAS 6G
SAS/SATA RAID Adapter Driver" from Aug 23, 2013, leads to the
following Smatch warning:
"drivers/scsi/esas2r/esas2r_vda.c:312 esas2r_complete_vda_ioctl()
         error: format string overflow. buf_size: 4 length: 5"

drivers/scsi/esas2r/esas2r_vda.c
   312                          sprintf((char *)&cfg->data.init.fw_release,
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^
This is a u32 but we are writing 4 characters and a NUL so it ends up
putting the NUL in cfg->data.init.epoch_time.

   313                                  "%1d.%02d",
   314                                  
(int)LOBYTE(le16_to_cpu(rsp->fw_release)),
   315                                  
(int)HIBYTE(le16_to_cpu(rsp->fw_release)));

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to