[pulseaudio-discuss] [PATCH] core-util: Filter out not-a-numbers in pa_atod()
David Henningsson
david.henningsson at canonical.com
Fri Apr 10 04:03:46 PDT 2015
On 2015-04-10 12:55, Tanu Kaskinen wrote:
> On Fri, 2015-04-10 at 12:41 +0200, David Henningsson wrote:
>> Ack, but add isinf too while you're at it?
>
> I thought about that, but inf needs to be supported at least for decibel
> volume parsing, so I decided not to filter those out. Allowing them is
> also less prone to bugs than allowing NaN, because this kind of range
> checks behave as expected:
>
> if (d < 0 || d > max_allowed)
> goto fail;
>
> If d is -inf or inf, that check works fine, but if d is NaN, the range
> check doesn't fail as it should.
Ok, then acked as it is.
>
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
More information about the pulseaudio-discuss
mailing list