lkml.org 
[lkml]   [2002]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH][2.5.22] sound/oss/sb_audio.c copy_from_user buglets
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/
\
 
 \ /
  Last update: 2005-03-22 13:26    [W:1.073 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site