ALSA: firewire-lib/bebob/oxfw: improve response evaluation for AV/C commands
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 3 Apr 2017 12:13:55 +0000 (21:13 +0900)
committerTakashi Iwai <tiwai@suse.de>
Wed, 5 Apr 2017 19:37:23 +0000 (21:37 +0200)
commit7e1621de146fbed6172252f14a6a41b2c5999a93
tree244737dfe7058e9e958aee74358526c2656d5106
parent5b33504bada4d85092b69b3aaa7048c398b21dbb
ALSA: firewire-lib/bebob/oxfw: improve response evaluation for AV/C commands

In ALSA firewire stack, some AV/C commands are supported, including
vendor's extensions. Drivers includes response parser of each command,
according to its requirements, while the parser is written with loose
fashion in two points; error check and length check. This doesn't cause
any issues such as kernel corruption, but should be improved.

This commit modifies evaluations of return value on each parsers.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/bebob/bebob_command.c
sound/firewire/fcp.c
sound/firewire/oxfw/oxfw-command.c