diff options
| -rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index c5d9564d455c..82b46ee8e7c1 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
| @@ -756,9 +756,9 @@ static int qla4xxx_get_chap_list(struct Scsi_Host *shost, uint16_t chap_tbl_idx, | |||
| 756 | continue; | 756 | continue; |
| 757 | 757 | ||
| 758 | chap_rec->chap_tbl_idx = i; | 758 | chap_rec->chap_tbl_idx = i; |
| 759 | strncpy(chap_rec->username, chap_table->name, | 759 | strlcpy(chap_rec->username, chap_table->name, |
| 760 | ISCSI_CHAP_AUTH_NAME_MAX_LEN); | 760 | ISCSI_CHAP_AUTH_NAME_MAX_LEN); |
| 761 | strncpy(chap_rec->password, chap_table->secret, | 761 | strlcpy(chap_rec->password, chap_table->secret, |
| 762 | QL4_CHAP_MAX_SECRET_LEN); | 762 | QL4_CHAP_MAX_SECRET_LEN); |
| 763 | chap_rec->password_length = chap_table->secret_len; | 763 | chap_rec->password_length = chap_table->secret_len; |
| 764 | 764 | ||
| @@ -6027,8 +6027,8 @@ static int qla4xxx_get_bidi_chap(struct scsi_qla_host *ha, char *username, | |||
| 6027 | if (!(chap_table->flags & BIT_6)) /* Not BIDI */ | 6027 | if (!(chap_table->flags & BIT_6)) /* Not BIDI */ |
| 6028 | continue; | 6028 | continue; |
| 6029 | 6029 | ||
| 6030 | strncpy(password, chap_table->secret, QL4_CHAP_MAX_SECRET_LEN); | 6030 | strlcpy(password, chap_table->secret, QL4_CHAP_MAX_SECRET_LEN); |
| 6031 | strncpy(username, chap_table->name, QL4_CHAP_MAX_NAME_LEN); | 6031 | strlcpy(username, chap_table->name, QL4_CHAP_MAX_NAME_LEN); |
| 6032 | ret = 0; | 6032 | ret = 0; |
| 6033 | break; | 6033 | break; |
| 6034 | } | 6034 | } |
| @@ -6258,8 +6258,8 @@ static void qla4xxx_get_param_ddb(struct ddb_entry *ddb_entry, | |||
| 6258 | 6258 | ||
| 6259 | tddb->tpgt = sess->tpgt; | 6259 | tddb->tpgt = sess->tpgt; |
| 6260 | tddb->port = conn->persistent_port; | 6260 | tddb->port = conn->persistent_port; |
| 6261 | strncpy(tddb->iscsi_name, sess->targetname, ISCSI_NAME_SIZE); | 6261 | strlcpy(tddb->iscsi_name, sess->targetname, ISCSI_NAME_SIZE); |
| 6262 | strncpy(tddb->ip_addr, conn->persistent_address, DDB_IPADDR_LEN); | 6262 | strlcpy(tddb->ip_addr, conn->persistent_address, DDB_IPADDR_LEN); |
| 6263 | } | 6263 | } |
| 6264 | 6264 | ||
| 6265 | static void qla4xxx_convert_param_ddb(struct dev_db_entry *fw_ddb_entry, | 6265 | static void qla4xxx_convert_param_ddb(struct dev_db_entry *fw_ddb_entry, |
| @@ -7764,7 +7764,7 @@ static int qla4xxx_sysfs_ddb_logout(struct iscsi_bus_flash_session *fnode_sess, | |||
| 7764 | goto exit_ddb_logout; | 7764 | goto exit_ddb_logout; |
| 7765 | } | 7765 | } |
| 7766 | 7766 | ||
| 7767 | strncpy(flash_tddb->iscsi_name, fnode_sess->targetname, | 7767 | strlcpy(flash_tddb->iscsi_name, fnode_sess->targetname, |
| 7768 | ISCSI_NAME_SIZE); | 7768 | ISCSI_NAME_SIZE); |
| 7769 | 7769 | ||
| 7770 | if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) | 7770 | if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) |
