]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Fix segfault when invalid TLV is passed v1.0.12
authorTakashi Iwai <tiwai@suse.de>
Wed, 23 Aug 2006 13:44:09 +0000 (15:44 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 23 Aug 2006 13:44:09 +0000 (15:44 +0200)
Fix segfault when invalid TLV is passed.
The invalid TLV entries must be ignored as error.

src/mixer/simple_none.c

index 1debacd850f82bb0cb5fe0e3d48712d9b7ca465a..9b217accc583bb9269b2bc2987dd412432fde70b 100644 (file)
@@ -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