]> git.alsa-project.org Git - alsa-lib.git/commitdiff
ucm: check for valid value list before dereference.
authorLiam Girdwood <lrg@slimlogic.co.uk>
Tue, 21 Dec 2010 22:11:56 +0000 (23:11 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 22 Dec 2010 07:05:50 +0000 (08:05 +0100)
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
src/ucm/main.c

index ff7b5e471673cb3cc714e35b52157b7b0e78938c..aafa4839d55e623a6c0567a49240e708120b1f01 100644 (file)
@@ -957,6 +957,9 @@ static int get_value1(const char **value, struct list_head *value_list,
         struct ucm_value *val;
         struct list_head *pos;
         
+       if (!value_list)
+               return -ENOENT;
+
         list_for_each(pos, value_list) {
               val = list_entry(pos, struct ucm_value, list);
               if (check_identifier(identifier, val->name)) {