From: Takashi Iwai Date: Wed, 23 Aug 2006 13:44:09 +0000 (+0200) Subject: Fix segfault when invalid TLV is passed X-Git-Tag: v1.0.12 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=66f3749cabe91ce58b865adc56f22a56328517a2;p=alsa-lib.git Fix segfault when invalid TLV is passed Fix segfault when invalid TLV is passed. The invalid TLV entries must be ignored as error. --- diff --git a/src/mixer/simple_none.c b/src/mixer/simple_none.c index 1debacd8..9b217acc 100644 --- a/src/mixer/simple_none.c +++ b/src/mixer/simple_none.c @@ -1022,7 +1022,7 @@ static int parse_db_range(struct selem_str *rec, unsigned int *tlv, default: break; } - return 1; /* not found */ + return -EINVAL; /* not found */ } /* convert the given raw volume value to a dB gain