Messages in this thread Patch in this message | | | Date | Tue, 18 Jun 2002 02:56:52 +0200 (MET DST) | From | Mikael Pettersson <> | 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/
| |