usb: gadget: f_mtp: Replace sscanf with kstrtou8_from_user
Variable "buf" may point to kernel address, a malicious user
could use code logic to get kernel information. Use
kstrtou8_from_user() which take care of copying buffer, and finding
u8 value here.
Change-Id: Ifa4b4adfc2a2eb447da0da48602a1c7d85762399
Signed-off-by:
Liangliang Lu <luliang@codeaurora.org>
Loading
Please register or sign in to comment