Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Sep 2013 10:18:37 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r255472 - head/sys/dev/usb/storage
Message-ID:  <201309111018.r8BAIbou010673@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Sep 11 10:18:36 2013
New Revision: 255472
URL: http://svnweb.freebsd.org/changeset/base/255472

Log:
  Clear correct data structure.
  
  MFC after:	1 week
  Approved by:	re (hrs)

Modified:
  head/sys/dev/usb/storage/umass.c

Modified: head/sys/dev/usb/storage/umass.c
==============================================================================
--- head/sys/dev/usb/storage/umass.c	Wed Sep 11 09:19:44 2013	(r255471)
+++ head/sys/dev/usb/storage/umass.c	Wed Sep 11 10:18:36 2013	(r255472)
@@ -1321,10 +1321,12 @@ umass_t_bbb_command_callback(struct usb_
 			}
 			sc->cbw.bCDBLength = sc->sc_transfer.cmd_len;
 
+			/* copy SCSI command data */
 			memcpy(sc->cbw.CBWCDB, sc->sc_transfer.cmd_data,
 			    sc->sc_transfer.cmd_len);
 
-			memset(sc->sc_transfer.cmd_data +
+			/* clear remaining command area */
+			memset(sc->cbw.CBWCDB +
 			    sc->sc_transfer.cmd_len, 0,
 			    sizeof(sc->cbw.CBWCDB) -
 			    sc->sc_transfer.cmd_len);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309111018.r8BAIbou010673>