mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 06:06:23 +00:00
qla2x00t: Fix a potential buffer overflow
Detected by Coverity. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6391 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+3
-2
@@ -2187,8 +2187,9 @@ qla2x00_set_model_info(scsi_qla_host_t *vha, uint8_t *model, size_t len,
|
||||
if (use_tbl &&
|
||||
ha->pdev->subsystem_vendor == PCI_VENDOR_ID_QLOGIC &&
|
||||
index < QLA_MODEL_NAMES) {
|
||||
strcpy(ha->model_number,
|
||||
qla2x00_model_name[index * 2]);
|
||||
strlcpy(ha->model_number,
|
||||
qla2x00_model_name[index * 2],
|
||||
sizeof(ha->model_number));
|
||||
strncpy(ha->model_desc,
|
||||
qla2x00_model_name[index * 2 + 1],
|
||||
sizeof(ha->model_desc) - 1);
|
||||
|
||||
Reference in New Issue
Block a user