mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
media: pci: mg4b: fix uninitialized iio scan data
Fix potential leak of uninitialized stack data to userspace by ensuring
that the `scan` structure is zeroed before use.
Fixes: 0ab13674a9 ("media: pci: mgb4: Added Digiteq Automotive MGB4 driver")
Cc: stable@vger.kernel.org
Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
faee7aaf87
commit
c0d3f6969b
|
|
@ -91,7 +91,7 @@ static irqreturn_t trigger_handler(int irq, void *p)
|
|||
struct {
|
||||
u32 data;
|
||||
s64 ts __aligned(8);
|
||||
} scan;
|
||||
} scan = { };
|
||||
|
||||
scan.data = mgb4_read_reg(&st->mgbdev->video, 0xA0);
|
||||
mgb4_write_reg(&st->mgbdev->video, 0xA0, scan.data);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user