Re: Misc 2.5 Fixes: cp-user-awe

Dipankar Sarma
2003-06-10T09:54:40Z

Fix copy/user in awe_wave.

sound/oss/awe_wave.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN sound/oss/awe_wave.c~cp-user-awe sound/oss/awe_wave.c
--- linux-2.5.70-ds/sound/oss/awe_wave.c~cp-user-awe 2003-06-08 20:49:13.000000000 +0530
+++ linux-2.5.70-ds-dipankar/sound/oss/awe_wave.c 2003-06-08 20:49:13.000000000 +0530
@@ -2046,9 +2046,9 @@ awe_ioctl(int dev, unsigned int cmd, cad
awe_info.nr_voices = awe_max_voices;
else
awe_info.nr_voices = AWE_MAX_CHANNELS;
- memcpy((char*)arg, &awe_info, sizeof(awe_info));
+ if(copy_to_user(arg, &awe_info, sizeof(awe_info)))
+ return -EFAULT;
return 0;
- break;

case SNDCTL_SEQ_RESETSAMPLES:
awe_reset(dev);

_