Skip to content

Commit eb9d84b

Browse files
takaswietiwai
authored andcommitted
ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
ALSA fireworks driver has a bug in its initial state to return count shorter than expected by 4 bytes to userspace applications when handling response frame for Echo Audio Fireworks transaction. It's due to missing addition of the size for the type of event in ALSA firewire stack. Fixes: 555e8a8 ("ALSA: fireworks: Add command/response functionality into hwdep interface") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20220424102428.21109-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 3b79954 commit eb9d84b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sound/firewire/fireworks/fireworks_hwdep.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained,
3434
type = SNDRV_FIREWIRE_EVENT_EFW_RESPONSE;
3535
if (copy_to_user(buf, &type, sizeof(type)))
3636
return -EFAULT;
37+
count += sizeof(type);
3738
remained -= sizeof(type);
3839
buf += sizeof(type);
3940

0 commit comments

Comments
 (0)