mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 06:06:23 +00:00
qla2x00t: Suppress a Coverity complaint about a potential buffer overflow
Coverity reported the following: Copy into fixed size buffer (STRING_OVERFLOW) fixed_size_dest: You might overrun the 17 byte fixed-size string ha->model_number by copying def without checking the length. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6683 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+2
-1
@@ -2190,7 +2190,8 @@ qla2x00_set_model_info(scsi_qla_host_t *vha, uint8_t *model, size_t len,
|
||||
qla2x00_model_name[index * 2 + 1],
|
||||
sizeof(ha->model_desc) - 1);
|
||||
} else {
|
||||
strcpy(ha->model_number, def);
|
||||
strlcpy(ha->model_number, def,
|
||||
sizeof(ha->model_number));
|
||||
}
|
||||
}
|
||||
if (IS_FWI2_CAPABLE(ha))
|
||||
|
||||
Reference in New Issue
Block a user