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:
Bart Van Assche
2015-11-12 18:26:26 +00:00
parent e1d9ed0128
commit 22a203d843
+2 -1
View File
@@ -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))