diff options
author | cg <cg@FreeBSD.org> | 2000-12-23 06:09:43 +0000 |
---|---|---|
committer | cg <cg@FreeBSD.org> | 2000-12-23 06:09:43 +0000 |
commit | f87f7d8216ab9bddcf5a8577c8ae78d0808777c1 (patch) | |
tree | 72af408a1151a5c11bc91e00ccc2d0de515fb95f /sys/dev/sound/pcm | |
parent | 2807ccd53de93c470a0533b0fa6045ac0395df27 (diff) | |
download | FreeBSD-src-f87f7d8216ab9bddcf5a8577c8ae78d0808777c1.zip FreeBSD-src-f87f7d8216ab9bddcf5a8577c8ae78d0808777c1.tar.gz |
fix a panic if the requested blocksize was greater than the data rate,
resulting in a divide by 0.
Diffstat (limited to 'sys/dev/sound/pcm')
-rw-r--r-- | sys/dev/sound/pcm/channel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 9595f85..36a1e72 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1247,6 +1247,8 @@ chn_setblocksize(pcm_channel *c, int blkcnt, int blksz) /* adjust for different hw format/speed */ irqhz = (bs->bps * bs->spd) / bs->blksz; + if (irqhz < 16) + irqhz = 16; b->blksz = (b->bps * b->spd) / irqhz; |