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

Skip to content
Commit a21ece7f authored by ChandanaKishori Chiluveru's avatar ChandanaKishori Chiluveru Committed by Gerrit - the friendly Code Review server
Browse files

usb: gadget: f_mtp:Fix issue of NULL pointer access in mtp_read



MTP usb device node created as a part of mtp function init call.
Userspace can read/write to MTP device using this node. If MTP is
not enabled in the composition and trying to read mtp_usb dev node
from the userspace leading to null pointer access in mtp_read.

Do not access ep OUT maxpacket size in mtp_read. First block on mtp_read
until the state become online which doesn't wakeup from the thread and
expecting for the read completion or state change which occurs as
a part of set_alt.

Change-Id: Icbee5fe7ae2c02b2bca185a0dc7587eb4940058a
Signed-off-by: default avatarChandanaKishori Chiluveru <cchilu@codeaurora.org>
parent 2d8539e1
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