mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
ucm: check for valid value list before dereference.
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
parent
6cda65ba98
commit
ebb52f6911
1 changed files with 3 additions and 0 deletions
|
|
@ -957,6 +957,9 @@ static int get_value1(const char **value, struct list_head *value_list,
|
||||||
struct ucm_value *val;
|
struct ucm_value *val;
|
||||||
struct list_head *pos;
|
struct list_head *pos;
|
||||||
|
|
||||||
|
if (!value_list)
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
list_for_each(pos, value_list) {
|
list_for_each(pos, value_list) {
|
||||||
val = list_entry(pos, struct ucm_value, list);
|
val = list_entry(pos, struct ucm_value, list);
|
||||||
if (check_identifier(identifier, val->name)) {
|
if (check_identifier(identifier, val->name)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue