linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] Input: db9 - clear unused function pointers
@ 2015-11-17 13:40 Sudip Mukherjee
  2015-11-17 13:40 ` [PATCH 2/5] Input: gamecon " Sudip Mukherjee
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-11-17 13:40 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input, Sudip Mukherjee

db9_parport_cb is a local uninitialized structure and the member
function pointers will be pointing to arbitrary locations unless they
are cleared.

Fixes: 2260c419b52b ("Input: db9 - use parallel port device model")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/input/joystick/db9.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c
index 932d073..da32609 100644
--- a/drivers/input/joystick/db9.c
+++ b/drivers/input/joystick/db9.c
@@ -592,6 +592,7 @@ static void db9_attach(struct parport *pp)
 		return;
 	}
 
+	memset(&db9_parport_cb, 0, sizeof(db9_parport_cb));
 	db9_parport_cb.flags = PARPORT_FLAG_EXCL;
 
 	pd = parport_register_dev_model(pp, "db9", &db9_parport_cb, port_idx);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-20  8:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 13:40 [PATCH 1/5] Input: db9 - clear unused function pointers Sudip Mukherjee
2015-11-17 13:40 ` [PATCH 2/5] Input: gamecon " Sudip Mukherjee
2015-11-17 13:40 ` [PATCH 3/5] Input: turbografx " Sudip Mukherjee
2015-11-17 13:40 ` [PATCH 4/5] Input: walkera0701 " Sudip Mukherjee
2015-11-17 13:40 ` [PATCH 5/5] Input: parkbd " Sudip Mukherjee
2015-11-17 18:00 ` [PATCH 1/5] Input: db9 " Dmitry Torokhov
2015-11-20  8:34   ` Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).