mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 01:13:11 +00:00
The status field in an EFW response is a 32-bit value supplied by the
firewire device. efr_status_names[] has 17 entries so a status value
outside that range goes off into the weeds when looking at the %s value.
Even worse, the status could return EFR_STATUS_INCOMPLETE which is
0x80000000, and is obviously not in that array of potential strings.
Fix this up by properly bounding the index against the array size and
printing "unknown" if it's not recognized.
Cc: Clemens Ladisch <[email protected]>
Cc: Takashi Sakamoto <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Fixes: bde8a8f23b ("ALSA: fireworks: Add transaction and some commands")
Cc: stable <[email protected]>
Assisted-by: gregkh_clanker_t1000
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Takashi Sakamoto <[email protected]>
Link: https://patch.msgid.link/2026040953-astute-camera-1aa1@gregkh
Signed-off-by: Takashi Iwai <[email protected]>