DragonFly commits List (threaded) for 2008-12
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: master: sys/dev/sound/pcm/vchan.c cb8ff21ad49e7a92c572b31c6e26ad74d0feed5f
YONETANI Tomokazu wrote:
On Mon, Dec 01, 2008 at 03:59:30PM -0800, Simon Schubert wrote:
http://gitweb.dragonflybsd.org/?p=dragonfly.git;a=commitdiff;h=cb8ff21ad49e7a92c572b31c6e26ad74d0feed5f
- scale = (volume << 16) / 100;
+ scale = log_mix_cvt[volume];
I don't see how it's guaranteed that (volume < countof(log_mix_cvt) - 1).
The comment above that says `volume is in range 0-100', which is only
satisfied when (ch->volume & 0xff) + ((ch->volume >> 8) & 0xff) <= 200,
but I see no such check in the code under /sys/dev/sound...
I believe that the mixer ioctls check for overflow. Otherwise this is a bug.
cheers
simon
--
<3 the future +++ RENT this banner advert +++ ASCII Ribbon /"\
rock the past +++ space for low €€€ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]