67300abdbe
Currently an out of range dev->nr is detected by just reporting the
issue and later on an out-of-bounds read on array card occurs because
of this. Fix this by checking the upper range of dev->nr with the size
of array card (removes the hard coded size), move this check earlier
and also exit with the error -ENOSYS to avoid the later out-of-bounds
array read.
Detected by CoverityScan, CID#711191 ("Out-of-bounds-read")
Fixes: commit
|
||
---|---|---|
.. | ||
cx25821-alsa.c | ||
cx25821-audio-upstream.c | ||
cx25821-audio-upstream.h | ||
cx25821-audio.h | ||
cx25821-biffuncs.h | ||
cx25821-cards.c | ||
cx25821-core.c | ||
cx25821-gpio.c | ||
cx25821-i2c.c | ||
cx25821-medusa-defines.h | ||
cx25821-medusa-reg.h | ||
cx25821-medusa-video.c | ||
cx25821-medusa-video.h | ||
cx25821-reg.h | ||
cx25821-sram.h | ||
cx25821-video-upstream.c | ||
cx25821-video-upstream.h | ||
cx25821-video.c | ||
cx25821-video.h | ||
cx25821.h | ||
Kconfig | ||
Makefile |