Commit a43fb034 authored by Michael Grzeschik's avatar Michael Grzeschik Committed by Todd Kjos
Browse files

UPSTREAM: usb: gadget: uvc: fix changing interface name via configfs



When setting the function name, it is always truncated by one char since
snprintf is always including the null-termination in the len parameter.
We use strscpy and fix the size setting to use len + 1 instead.

Fixes: 324e4f85 ("usb: gadget: uvc: allow changing interface name via configfs")
Signed-off-by: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20220707115612.2760569-1-m.grzeschik@pengutronix.de


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit 3d0dc539)
Bug: 242344221
Change-Id: I9a138af30c0628b1ec127f7986ace12df77b2d00
Signed-off-by: default avatarAvichal Rakesh <arakesh@google.com>
parent 121bf203
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment