ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 3 Nov 2020 10:18:07 +0000 (13:18 +0300)
committerTakashi Iwai <tiwai@suse.de>
Tue, 3 Nov 2020 13:11:38 +0000 (14:11 +0100)
commit158e1886b6262c1d1c96a18c85fac5219b8bf804
tree40fa0b6e57fdec473c785892a4e938e04d3192d2
parent9fc149c3bce7bdbb94948a8e6bd025e3b3538603
ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link()

This is harmless, but the "addr" comes from the user and it could lead
to a negative shift or to shift wrapping if it's too high.

Fixes: 0b00a5615dc4 ("ALSA: hdac_ext: add hdac extended controller")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201103101807.GC1127762@mwanda
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/ext/hdac_ext_controller.c