Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3aff03d9 authored by Daniel W. S. Almeida's avatar Daniel W. S. Almeida Committed by Greg Kroah-Hartman
Browse files

media: uvcvideo: Fix dereference of out-of-bound list iterator

[ Upstream commit f875bcc375c738bf2f599ff2e1c5b918dbd07c45 ]

Fixes the following coccinelle report:

drivers/media/usb/uvc/uvc_ctrl.c:1860:5-11:
ERROR: invalid reference to the index variable of the iterator on line 1854

by adding a boolean variable to check if the loop has found the

Found using - Coccinelle (http://coccinelle.lip6.fr

)

[Replace cursor variable with bool found]

Signed-off-by: default avatarDaniel W. S. Almeida <dwlsalmeida@gmail.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent cbc03ded
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment