upstream: [media] mxl111sf: Fix unintentional garbage stack read
authorDave Jones <davej@fedoraproject.org>
Thu, 30 Jan 2014 03:11:33 +0000 (00:11 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:54:34 +0000 (11:54 +0900)
commit1f5e7a25bb05dac56936c186ab498422ff362524
treef31cb971bc4b17e4fbd1805866380abaaeb00344
parent0ac8d430900619c8e929605f7c150dc21e7ce14e
upstream: [media] mxl111sf: Fix unintentional garbage stack read

mxl111sf_read_reg takes an address of a variable to write to as an argument.
drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c:mxl111sf_config_pin_mux_modes
passes several uninitialized stack variables to this routine, expecting
them to be filled in.  In the event that something unexpected happens when
reading from the chip, we end up doing a pr_debug of the value passed in,
revealing whatever garbage happened to be on the stack.

Change the pr_debug to match what happens in the 'success' case, where we
assign buf[1] to *data.

Spotted with Coverity (Bugs 731910 through 731917)

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/dvb-usb-v2/mxl111sf.c