From owner-svn-src-all@FreeBSD.ORG Wed Sep 11 10:18:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 617EC34A; Wed, 11 Sep 2013 10:18:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E8CE21B5; Wed, 11 Sep 2013 10:18:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8BAIbhT010674; Wed, 11 Sep 2013 10:18:37 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8BAIbou010673; Wed, 11 Sep 2013 10:18:37 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309111018.r8BAIbou010673@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 11 Sep 2013 10:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255472 - head/sys/dev/usb/storage X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2013 10:18:37 -0000 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);