aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2022-05-20 16:55:37 +0000
committerTakashi Iwai <[email protected]>2022-05-21 06:48:57 +0000
commit12626530de84d2b00ff6480142f7f4374662c0c3 (patch)
tree21f2baba5bf07adaa51066cd16baa40737d13afa /fs/jbd2/commit.c
parentMerge tag 'asoc-fix-v5.18-rc7' of https://git.kernel.org/pub/scm/linux/kernel... (diff)
downloadkernel-12626530de84d2b00ff6480142f7f4374662c0c3.tar.gz
kernel-12626530de84d2b00ff6480142f7f4374662c0c3.zip
ALSA: lola: Bounds check loop iterator against streams array size
GCC 12 sees that it's technically possible for num_streams to be larger than ARRAY_SIZE(pcm->streams). Bounds-check the iterator. ../sound/pci/lola/lola_pcm.c: In function 'lola_pcm_update': ../sound/pci/lola/lola_pcm.c:567:64: warning: array subscript [0, 31] is outside array bounds of 'struct lola_stream[16]' [-Warray-bounds] 567 | struct lola_stream *str = &pcm->streams[i]; | ~~~~~~~~~~~~^~~ In file included from ../sound/pci/lola/lola_pcm.c:15: ../sound/pci/lola/lola.h:307:28: note: while referencing 'streams' 307 | struct lola_stream streams[MAX_STREAM_COUNT]; | ^~~~~~~ Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions