[pulseaudio-discuss] [PATCH] ucm: Add a FIXME comment about bad error handling
Tanu Kaskinen
tanu.kaskinen at linux.intel.com
Thu Nov 28 21:22:22 PST 2013
On Mon, 2013-11-18 at 18:48 +0200, Tanu Kaskinen wrote:
> ---
> src/modules/alsa/alsa-ucm.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
> index ef3ddb2..2995b32 100644
> --- a/src/modules/alsa/alsa-ucm.c
> +++ b/src/modules/alsa/alsa-ucm.c
> @@ -1125,6 +1125,8 @@ static void alsa_mapping_add_ucm_modifier(pa_alsa_mapping *m, pa_alsa_ucm_modifi
> }
>
> if (channel_str) {
> + /* FIXME: channel_str is unsanitized input from the UCM configuration,
> + * we should do proper error handling instead of asserting. */
> pa_assert_se(pa_atou(channel_str, &channels) == 0 && channels < PA_CHANNELS_MAX);
> pa_log_debug("Got channel count %" PRIu32 " for modifier", channels);
> }
No feedback received. I applied this patch now, with an added reference
to https://bugs.freedesktop.org/show_bug.cgi?id=71823 .
--
Tanu
More information about the pulseaudio-discuss
mailing list