siox: fix possible buffer overflow in device_add_store
authorGavin Schenk <g.schenk@eckelmann.de>
Wed, 14 Feb 2018 14:25:02 +0000 (15:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Mar 2018 17:07:46 +0000 (18:07 +0100)
commitf87deada80fe483e2286e29cd866dc66ddc2b6bc
treebcc1c18916e587af9591a24bea3663d589ac5bd8
parent3ba9faedc180097805613dac7a866432852cc4e5
siox: fix possible buffer overflow in device_add_store

Width 20 given in format string is larger than destination
buffer 'type[20]', use %19s to prevent overflowing it.

Fixes: bbecb07fa0af ("siox: new driver framework for eckelmann SIOX")
Cc: stable <stable@vger.kernel.org>
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Gavin Schenk <g.schenk@eckelmann.de>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/siox/siox-core.c