Re: Misc 2.5 Fixes: cp-user-awe

Dipankar Sarma (dipankar@in.ibm.com)
Tue, 10 Jun 2003 15:39:05 +0530


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);

_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/