]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: sst: fixups in SNDRV_SST_STREAM_DECODE
authorDan Carpenter <error27@gmail.com>
Tue, 19 Oct 2010 05:57:48 +0000 (07:57 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 9 Nov 2010 21:30:49 +0000 (13:30 -0800)
commit267dc2720c026870d6ea0f73366ccd77c795f628
tree1bfeb34fdeef5a2a1af5c0cb971c846fda15e4c4
parent6dad6d82ba364d04996e0dd238248734b3ceec53
Staging: sst: fixups in SNDRV_SST_STREAM_DECODE

This is another patch about copying data to the kernel before using it.

SNDRV_SST_STREAM_DECODE is sort of tricky because we need to do a
copy_from_user() that gives us another two pointers and we have copy
those.  Those again give us some more pointers that we have to copy.

Besides those problems, the code had a stack overflow:
- struct snd_sst_buff_entry ibuf_temp[param->ibufs->entries],
- obuf_temp[param->obufs->entries];
param->ibufs->entries comes from the user.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/intel_sst/intel_sst_app_interface.c