Commit 9c198d43959fb6991815a76f7eb6dcba0b98ff26 introduced a bug by
changing extdata from a void * to a long *.  The pointer addition to
calculate the offset of the AHS in extended CDBs was off by a factor
of 8, leading to memory scribbles.  Fix with an explicit cast.

Signed-off-by: Pete Wyckoff <[EMAIL PROTECTED]>
---
 usr/iscsi/iscsid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index 54386fc..8872818 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -1476,7 +1476,7 @@ static int iscsi_scsi_cmd_rx_start(struct 
iscsi_connection *conn)
        task->tag = req->itt;
 
        if (ahs_len) {
-               task->ahs = task->extdata + sizeof(req->cdb);
+               task->ahs = (uint8_t *) task->extdata + sizeof(req->cdb);
                conn->req.ahs = task->ahs;
                conn->req.data = task->data;
        } else if (data_len)
-- 
1.5.3.6

_______________________________________________
Stgt-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/stgt-devel

Reply via email to