lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1205159807-11701-1-git-send-email-jirislaby@gmail.com>
Date:	Mon, 10 Mar 2008 15:36:47 +0100
From:	Jiri Slaby <jirislaby@...il.com>
To:	Greg Kroah-Hartman <gregkh@...e.de>
Cc:	<linux-kernel@...r.kernel.org>, Dean Anderson <dean@...soray.com>,
	linux-usb@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jiri Slaby <jirislaby@...il.com>
Subject: [PATCH] USB: s2255drv, fix memset(0)

Swap second and third paramter of memset in s2255_board_init, since it's
apparently wrong. Also do not re-init its entries to 0 again.

Signed-off-by: Jiri Slaby <jirislaby@...il.com>
---
 drivers/usb/image/s2255drv.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/image/s2255drv.c b/drivers/usb/image/s2255drv.c
index e1cf2dc..2d15a36 100644
--- a/drivers/usb/image/s2255drv.c
+++ b/drivers/usb/image/s2255drv.c
@@ -2393,9 +2393,7 @@ static int s2255_board_init(struct s2255_dev *dev)
 	for (j = 0; j < MAX_PIPE_BUFFERS; j++) {
 		struct s2255_pipeinfo *pipe = &dev->pipes[j];
 
-		memset(pipe, sizeof(struct s2255_pipeinfo), 0);
-		pipe->state = 0;
-		pipe->prev_state = 0;
+		memset(pipe, 0, sizeof(*pipe));
 		pipe->dev = dev;
 		pipe->cur_transfer_size = DEFAULT_PIPE_USBBLOCK;
 		pipe->max_transfer_size = MAX_PIPE_USBBLOCK;
-- 
1.5.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ