goto exit_get_chap;
        }
 
-       strlcpy(password, chap_table->secret, QL4_CHAP_MAX_SECRET_LEN);
-       strlcpy(username, chap_table->name, QL4_CHAP_MAX_NAME_LEN);
+       strscpy(password, chap_table->secret, QL4_CHAP_MAX_SECRET_LEN);
+       strscpy(username, chap_table->name, QL4_CHAP_MAX_NAME_LEN);
        chap_table->cookie = cpu_to_le16(CHAP_VALID_COOKIE);
 
 exit_get_chap:
                goto exit_unlock_uni_chap;
        }
 
-       strlcpy(password, chap_table->secret, MAX_CHAP_SECRET_LEN);
-       strlcpy(username, chap_table->name, MAX_CHAP_NAME_LEN);
+       strscpy(password, chap_table->secret, MAX_CHAP_SECRET_LEN);
+       strscpy(username, chap_table->name, MAX_CHAP_NAME_LEN);
 
        rval = QLA_SUCCESS;
 
 
                        continue;
 
                chap_rec->chap_tbl_idx = i;
-               strlcpy(chap_rec->username, chap_table->name,
+               strscpy(chap_rec->username, chap_table->name,
                        ISCSI_CHAP_AUTH_NAME_MAX_LEN);
-               strlcpy(chap_rec->password, chap_table->secret,
+               strscpy(chap_rec->password, chap_table->secret,
                        QL4_CHAP_MAX_SECRET_LEN);
                chap_rec->password_length = chap_table->secret_len;
 
                if (!(chap_table->flags & BIT_6)) /* Not BIDI */
                        continue;
 
-               strlcpy(password, chap_table->secret, QL4_CHAP_MAX_SECRET_LEN);
-               strlcpy(username, chap_table->name, QL4_CHAP_MAX_NAME_LEN);
+               strscpy(password, chap_table->secret, QL4_CHAP_MAX_SECRET_LEN);
+               strscpy(username, chap_table->name, QL4_CHAP_MAX_NAME_LEN);
                ret = 0;
                break;
        }
 
        tddb->tpgt = sess->tpgt;
        tddb->port = conn->persistent_port;
-       strlcpy(tddb->iscsi_name, sess->targetname, ISCSI_NAME_SIZE);
-       strlcpy(tddb->ip_addr, conn->persistent_address, DDB_IPADDR_LEN);
+       strscpy(tddb->iscsi_name, sess->targetname, ISCSI_NAME_SIZE);
+       strscpy(tddb->ip_addr, conn->persistent_address, DDB_IPADDR_LEN);
 }
 
 static void qla4xxx_convert_param_ddb(struct dev_db_entry *fw_ddb_entry,
                goto exit_ddb_logout;
        }
 
-       strlcpy(flash_tddb->iscsi_name, fnode_sess->targetname,
+       strscpy(flash_tddb->iscsi_name, fnode_sess->targetname,
                ISCSI_NAME_SIZE);
 
        if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4))