diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2015-01-07 16:31:16 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-07 16:39:21 +0100 |
commit | 92cb46584e104e2f4b14a44959109ffe13524a26 (patch) | |
tree | 5e84e053a59cde57f3435f754eb0198944209f95 /sound/firewire | |
parent | ALSA: hda - Add new GPU codec ID 0x10de0072 to snd-hda (diff) | |
download | linux-92cb46584e104e2f4b14a44959109ffe13524a26.tar.xz linux-92cb46584e104e2f4b14a44959109ffe13524a26.zip |
ALSA: fireworks: fix an endianness bug for transaction length
Although the 't->length' is a big-endian value, it's used without any
conversion. This means that the driver always uses 'length' parameter.
Fixes: 555e8a8f7f14("ALSA: fireworks: Add command/response functionality into hwdep interface")
Reported-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire')
-rw-r--r-- | sound/firewire/fireworks/fireworks_transaction.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/firewire/fireworks/fireworks_transaction.c b/sound/firewire/fireworks/fireworks_transaction.c index 255dabc6fc33..2a85e4209f0b 100644 --- a/sound/firewire/fireworks/fireworks_transaction.c +++ b/sound/firewire/fireworks/fireworks_transaction.c @@ -124,7 +124,7 @@ copy_resp_to_buf(struct snd_efw *efw, void *data, size_t length, int *rcode) spin_lock_irq(&efw->lock); t = (struct snd_efw_transaction *)data; - length = min_t(size_t, t->length * sizeof(t->length), length); + length = min_t(size_t, be32_to_cpu(t->length) * sizeof(u32), length); if (efw->push_ptr < efw->pull_ptr) capacity = (unsigned int)(efw->pull_ptr - efw->push_ptr); |