diff options
author | Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> | 2022-02-26 07:25:31 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-02 00:39:37 +0300 |
commit | b497e06d2714b22200e0bad76111229c960debd5 (patch) | |
tree | 5610e1ec8b2eceed08f05cf9917d8e327c10d180 /drivers/staging/pi433 | |
parent | 095f746502740d76a086ab127e11b3c4dba78141 (diff) | |
download | linux-b497e06d2714b22200e0bad76111229c960debd5.tar.xz |
staging: pi433: prevent uninitialized data from being printed out
local_buffer is not initialised before data is passed to
spi_sync_transfer. In case spi* function fails then the dev_dbg
statement after that can potentially print out uninitialised data
this patch initialises local_buffer array.
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/Yhmruyr2BUn0+3O3@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/pi433')
-rw-r--r-- | drivers/staging/pi433/rf69.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index e5b23ab39c69..3028018f0b45 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -782,7 +782,7 @@ int rf69_read_fifo(struct spi_device *spi, u8 *buffer, unsigned int size) { int i; struct spi_transfer transfer; - u8 local_buffer[FIFO_SIZE + 1]; + u8 local_buffer[FIFO_SIZE + 1] = {}; int retval; if (size > FIFO_SIZE) { |