提交 bfbdb31d 编写于 作者: N Nicholas Bellinger

iscsi-target: Fix NULL pointer dereference in iscsit_send_reject

Fix up a NULL pointer dereference regression in iscsit_send_reject()
introduced by from commit 2ec5a8c1.
Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 64146db7
...@@ -3557,11 +3557,11 @@ static int iscsit_send_reject( ...@@ -3557,11 +3557,11 @@ static int iscsit_send_reject(
struct iscsi_cmd *cmd, struct iscsi_cmd *cmd,
struct iscsi_conn *conn) struct iscsi_conn *conn)
{ {
u32 iov_count = 0, tx_size = 0; struct iscsi_reject *hdr = (struct iscsi_reject *)&cmd->pdu[0];
struct iscsi_reject *hdr;
struct kvec *iov; struct kvec *iov;
u32 iov_count = 0, tx_size;
iscsit_build_reject(cmd, conn, (struct iscsi_reject *)&cmd->pdu[0]); iscsit_build_reject(cmd, conn, hdr);
iov = &cmd->iov_misc[0]; iov = &cmd->iov_misc[0];
iov[iov_count].iov_base = cmd->pdu; iov[iov_count].iov_base = cmd->pdu;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册