Update of /cvsroot/alsa/alsa-kernel/pci/rme9652
In directory sc8-pr-cvs1:/tmp/cvs-serv4328

Modified Files:
        hdsp.c 
Log Message:
Pablo Menichini <[EMAIL PROTECTED]>
As Smatch point out, there are two call to copy_from_user without the
check of the return code. This patch fix this...


Index: hdsp.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/rme9652/hdsp.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- hdsp.c      14 Feb 2003 09:34:24 -0000      1.23
+++ hdsp.c      1 Mar 2003 08:17:50 -0000       1.24
@@ -2310,7 +2310,8 @@
 
        channel_buf = hdsp_channel_buffer_location (hdsp, substream->pstr->stream, 
channel);
        snd_assert(channel_buf != NULL, return -EIO);
-       copy_from_user(channel_buf + pos * 4, src, count * 4);
+       if (copy_from_user(channel_buf + pos * 4, src, count * 4))
+               return -EFAULT;
        return count;
 }
 
@@ -2324,7 +2325,8 @@
 
        channel_buf = hdsp_channel_buffer_location (hdsp, substream->pstr->stream, 
channel);
        snd_assert(channel_buf != NULL, return -EIO);
-       copy_to_user(dst, channel_buf + pos * 4, count * 4);
+       if (copy_to_user(dst, channel_buf + pos * 4, count * 4))
+               return -EFAULT;
        return count;
 }
 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to