提交 35bea5c8 编写于 作者: B Bart Van Assche 提交者: Martin K. Petersen

scsi: target/iscsi: Make iscsit_ta_authentication() respect the output buffer size

Fixes: e48354ce ("iscsi-target: Add iSCSI fabric support for target v4.1")
Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: NMike 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: NMartin K. Petersen <martin.petersen@oracle.com>
上级 ed88f055
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册