[pulseaudio-discuss] [PATCH] ucm: Add a FIXME comment about bad error handling

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Mon Nov 18 08:48:05 PST 2013


---
 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);
     }
-- 
1.8.3.1



More information about the pulseaudio-discuss mailing list