media: dm1105: Limit number of cards to avoid buffer over read

dm1105_probe() counts number of cards at dm1105_devcount,
but missed bounds check before dereference a card array.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Anton Vasilyev 2018-07-18 10:13:56 -04:00 • committed by Mauro Carvalho Chehab
commit 65b40a986f