[PATCH][2.5.22] sound/oss/sb_audio.c copy_from_user buglets

From: Mikael Pettersson (mikpe@csd.uu.se)
Date: Mon Jun 17 2002 - 19:56:52 EST


Fallout of copy_from_user() cleanups. sb16_copy_from_user()
returns void not int, so it can't return -EFAULT.

/Mikael

--- linux-2.5.22/sound/oss/sb_audio.c.~1~ Wed May 22 14:50:44 2002
+++ linux-2.5.22/sound/oss/sb_audio.c Tue Jun 18 00:40:08 2002
@@ -851,7 +851,7 @@
         {
                 if (copy_from_user(localbuf + localoffs,
                                    userbuf + useroffs, len))
- return -EFAULT;
+ return;
                 *used = len;
                 *returned = len;
         }
@@ -874,7 +874,7 @@
                         if (copy_from_user(lbuf16,
                                            userbuf + useroffs + (p << 1),
                                            locallen << 1))
- return -EFAULT;
+ return;
                         for (i = 0; i < locallen; i++)
                         {
                                 buf8[p+i] = ~((lbuf16[i] >> 8) & 0xff) ^ 0x80;
@@ -904,7 +904,7 @@
                         if (copy_from_user(lbuf8,
                                            userbuf+useroffs + p,
                                            locallen))
- return -EFAULT;
+ return;
                         for (i = 0; i < locallen; i++)
                         {
                                 buf16[p+i] = (~lbuf8[i] ^ 0x80) << 8;
-
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/



This archive was generated by hypermail 2b29 : Sun Jun 23 2002 - 22:00:15 EST