summaryrefslogtreecommitdiff
path: root/drivers/target/iscsi/iscsi_target_tpg.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-06-23 00:53:01 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-07-02 23:44:31 +0300
commit35bea5c84fd13c643cce63f0b5cd4b148f8c901d (patch)
tree56edeb4259dc27f4b44cd158de443c7657f00094 /drivers/target/iscsi/iscsi_target_tpg.c
parented88f055788a89598c33d183652af8a84dfc5007 (diff)
downloadlinux-35bea5c84fd13c643cce63f0b5cd4b148f8c901d.tar.xz
scsi: target/iscsi: Make iscsit_ta_authentication() respect the output buffer size
Fixes: e48354ce078c ("iscsi-target: Add iSCSI fabric support for target v4.1") Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Mike Christie <mchristi@redhat.com> Cc: Mike Christie <mchristi@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_tpg.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_tpg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/target/iscsi/iscsi_target_tpg.c b/drivers/target/iscsi/iscsi_target_tpg.c
index 4b34f71547c6..101d62105c93 100644
--- a/drivers/target/iscsi/iscsi_target_tpg.c
+++ b/drivers/target/iscsi/iscsi_target_tpg.c
@@ -636,8 +636,7 @@ int iscsit_ta_authentication(struct iscsi_portal_group *tpg, u32 authentication)
none = strstr(buf1, NONE);
if (none)
goto out;
- strncat(buf1, ",", strlen(","));
- strncat(buf1, NONE, strlen(NONE));
+ strlcat(buf1, "," NONE, sizeof(buf1));
if (iscsi_update_param_value(param, buf1) < 0)
return -EINVAL;
}