From: Marcin Pietraszko Date: Mon, 26 Aug 2019 11:51:41 +0000 (+0200) Subject: topology: Fix variable overflow in split_format X-Git-Tag: v1.2.1~37 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=1d7a131f781fa8b5c711ee9b585b334733e91b0c;p=alsa-lib.git topology: Fix variable overflow in split_format The 1 which was 32-bit long, when left-shifted by more than 31 caused an overflow, which resulted in some of the formats being not supported. Signed-off-by: Marcin Pietraszko Signed-off-by: Takashi Iwai --- diff --git a/src/topology/pcm.c b/src/topology/pcm.c index c533ee68..553fd822 100644 --- a/src/topology/pcm.c +++ b/src/topology/pcm.c @@ -321,7 +321,7 @@ static int split_format(struct snd_soc_tplg_stream_caps *caps, char *str) return -EINVAL; } - caps->formats |= 1 << format; + caps->formats |= 1ull << format; s = strtok(NULL, ", "); i++; }