little patch

Giuliano Pochini (pochini@denise.shiny.it)
Mon, 12 Jul 1999 21:12:42 CEST


If size>=30 it will overflow in case of a 16-bit stereo stream.

-----------cut--------------
--- linux/drivers/sound/dmasound.old Sun Jul 11 22:16:19 1999
+++ linux/drivers/sound/dmasound.c Sun Jul 11 22:24:09 1999
@@ -4579,7 +4579,7 @@
if (nbufs < 2 || nbufs > numBufs)
nbufs = numBufs;
size &= 0xffff;
- if (size >= 8 && size <= 30) {
+ if (size >= 8 && size <= 29) {
size = 1 << size;
size *= sound.hard.size * (sound.hard.stereo + 1);
size /= sound.soft.size * (sound.soft.stereo + 1);
-----------cut--------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/