ALSA: hwdep: fix a left shifting 1 by 31 UB bug
[ Upstream commit fb8cd6481ffd126f35e9e146a0dcf0c4e8899f2e ]
The "info.index" variable can be 31 in "1 << info.index".
This might trigger an undefined behavior since 1 is signed.
Fix this by casting 1 to 1u just to be sure "1u << 31" is defined.
Signed-off-by: Changming Liu <firstname.lastname@example.org>
Signed-off-by: Takashi Iwai <email@example.com>
Signed-off-by: Sasha Levin <firstname.lastname@example.org>
1 file changed