summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2014-03-25 12:01:28 +0000
committerdlg <dlg@openbsd.org>2014-03-25 12:01:28 +0000
commitbd6c3caab1ffcd726272961d955aed9a5626ae99 (patch)
tree85060bde1594eaad23fdd528eec0947b184dbf14
parentreword error message when a table has an invalid configuration file, it has (diff)
downloadwireguard-openbsd-bd6c3caab1ffcd726272961d955aed9a5626ae99.tar.xz
wireguard-openbsd-bd6c3caab1ffcd726272961d955aed9a5626ae99.zip
when working with the cdb its better to use cmdlen than datalen.
ok jmatthew@
-rw-r--r--sys/dev/pci/qle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/qle.c b/sys/dev/pci/qle.c
index c40f9109a07..4a06d935d7e 100644
--- a/sys/dev/pci/qle.c
+++ b/sys/dev/pci/qle.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qle.c,v 1.17 2014/03/25 07:15:52 dlg Exp $ */
+/* $OpenBSD: qle.c,v 1.18 2014/03/25 12:01:28 dlg Exp $ */
/*
* Copyright (c) 2013, 2014 Jonathan Matthew <jmatthew@openbsd.org>
@@ -2388,7 +2388,7 @@ qle_put_cmd(struct qle_softc *sc, void *buf, struct scsi_xfer *xs,
if (xs->cmdlen > 16) {
htolem16(&req->req_fcp_cmnd_len, 12 + xs->cmdlen + 4);
cmnd->fcp_add_cdb_len = xs->cmdlen - 16;
- memcpy(cmnd->fcp_cdb + xs->datalen, &fcp_dl, sizeof(fcp_dl));
+ memcpy(cmnd->fcp_cdb + xs->cmdlen, &fcp_dl, sizeof(fcp_dl));
} else {
htolem16(&req->req_fcp_cmnd_len, 12 + 16 + 4);
cmnd->fcp_add_cdb_len = 0;