[alsa-devel] [PATCH 07/11] ucm: check for valid value list before dereference.

Liam Girdwood lrg at slimlogic.co.uk
Tue Dec 21 23:11:56 CET 2010


Signed-off-by: Liam Girdwood <lrg at slimlogic.co.uk>
---
 src/ucm/main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/ucm/main.c b/src/ucm/main.c
index 403f5c5..3a61679 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -959,6 +959,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)) {
-- 
1.7.1



More information about the Alsa-devel mailing list