summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-02-01 13:30:56 +0100
committerJaroslav Kysela <perex@perex.cz>2010-02-01 14:12:12 +0100
commit6123637fafbf445cc9ce5774dc9516da0b2daa88 (patch)
tree270effa61bb6e4fab8ec44698e7fafa37b0e7ddc /sound/core
parenta75d7a4cf50d1cee14d8c9aaa2b971232d10f2c1 (diff)
downloadop-kernel-dev-6123637fafbf445cc9ce5774dc9516da0b2daa88.zip
op-kernel-dev-6123637fafbf445cc9ce5774dc9516da0b2daa88.tar.gz
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: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index 6a4764d..439ce64 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -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;
down_read(&card->controls_rwsem);
kctl = snd_ctl_find_numid(card, tlv.numid);
OpenPOWER on IntegriCloud