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

Skip to content
Unverified Commit 70fdc4ee authored by Pratham Pratap's avatar Pratham Pratap Committed by Michael Bestas
Browse files

usb: f_fs: Avoid invalid pointer access in ffs_fs_get_tree



Consider a case where ffs_data_new is getting called from
ffs_fs_get_tree and ffs_data_new returns error pointer since
the function (e.g. adb) is already mounted. The driver is only
checking for the NULL return value for ffs but in this case it
will not be NULL, which will fail the check and driver will go
ahead accessing invalid pointer which can lead to inconsistencies.

Fix this by having NULL as well as error pointer check for ffs.

Change-Id: Idad5a0b91148325258ea3f545d4da71644c7fc53
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 71f78731
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