Commit 6123637f authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Jaroslav Kysela

sound: control: fix minimum TLV length

Allow TLV blocks that do not have any values; the smallest possible TLV
is an empty container or one where the information is only in the tag.
Signed-off-by: default avatarClemens Ladisch <>
Signed-off-by: default avatarJaroslav Kysela <>
parent a75d7a4c
......@@ -1100,7 +1100,7 @@ static int snd_ctl_tlv_ioctl(struct snd_ctl_file *file,
if (copy_from_user(&tlv, _tlv, sizeof(tlv)))
return -EFAULT;
if (tlv.length < sizeof(unsigned int) * 3)
if (tlv.length < sizeof(unsigned int) * 2)
return -EINVAL;
kctl = snd_ctl_find_numid(card, tlv.numid);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment