diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-07-08 19:01:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-09 13:33:28 -0400 |
commit | 026dadad6b44f0469a475efb4cae48269d8848bd (patch) | |
tree | 7fbe73e69b0f806b34a7e4ac8fe80c445deb171f /drivers/char/mwave/tp3780i.c | |
parent | 758a6ba39ef6df4cdc615e5edd7bd86eab81a5f7 (diff) |
mwave: fix info leak in mwave_ioctl()
Smatch complains that on 64 bit systems, there is a hole in the
MW_ABILITIES struct between ->component_count and ->component_list[].
It leaks stack information from the mwave_ioctl() function.
I've added a memset() to initialize the struct to zero.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Greg KH <greg@kroah.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/mwave/tp3780i.c')
-rw-r--r-- | drivers/char/mwave/tp3780i.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/mwave/tp3780i.c b/drivers/char/mwave/tp3780i.c index c68969708068..04e6d6a27994 100644 --- a/drivers/char/mwave/tp3780i.c +++ b/drivers/char/mwave/tp3780i.c | |||
@@ -479,6 +479,7 @@ int tp3780I_QueryAbilities(THINKPAD_BD_DATA * pBDData, MW_ABILITIES * pAbilities | |||
479 | PRINTK_2(TRACE_TP3780I, | 479 | PRINTK_2(TRACE_TP3780I, |
480 | "tp3780i::tp3780I_QueryAbilities entry pBDData %p\n", pBDData); | 480 | "tp3780i::tp3780I_QueryAbilities entry pBDData %p\n", pBDData); |
481 | 481 | ||
482 | memset(pAbilities, 0, sizeof(*pAbilities)); | ||
482 | /* fill out standard constant fields */ | 483 | /* fill out standard constant fields */ |
483 | pAbilities->instr_per_sec = pBDData->rDspSettings.uIps; | 484 | pAbilities->instr_per_sec = pBDData->rDspSettings.uIps; |
484 | pAbilities->data_size = pBDData->rDspSettings.uDStoreSize; | 485 | pAbilities->data_size = pBDData->rDspSettings.uDStoreSize; |