Skip to content
Snippets Groups Projects
Commit a6de7b32 authored by Colin Ian King's avatar Colin Ian King Committed by Takashi Iwai
Browse files

ALSA: rawmidi: fix incorrect array bounds check on clock_names


The array bounds check on clock_names is currently checking the size
of the entire array rather than the number of elements in the array
leading to a potential array bounds read error. Fix this by using
the ARRAY_SIZE macro instead of sizeof.

Addresses-Coverity: ("Out-of-bounds read")
Fixes: 08fdced6 ("ALSA: rawmidi: Add framing mode")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210519105424.55221-1-colin.king@canonical.com


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 3fda230b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment