Update of /cvsroot/alsa/alsa-kernel/pci/rme9652 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27679
Modified Files: hdsp.c Log Message: Fixed wrong assert, added checks for copy_*_user functions Index: hdsp.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/rme9652/hdsp.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- hdsp.c 26 Jan 2004 15:07:31 -0000 1.51 +++ hdsp.c 22 Feb 2004 18:41:55 -0000 1.52 @@ -3810,7 +3810,7 @@ { int mapped_channel; - snd_assert(channel >= 0 || channel < hdsp->max_channels, return NULL); + snd_assert(channel >= 0 && channel < hdsp->max_channels, return NULL); if ((mapped_channel = hdsp->channel_map[channel]) < 0) { return NULL; @@ -3833,7 +3833,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; } @@ -3847,7 +3848,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; } ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog