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

Skip to content
Commit 6a4f6451 authored by Siba Prasad's avatar Siba Prasad Committed by Gerrit - the friendly Code Review server
Browse files

mmc: card: block: check the user controlled parameters to avoid overflow



According to specs, some commands require a delay after
issuing the command. idata->ic struct is received from
user in mmc_blk_ioctl_cmd(). So idata->ic.postsleep_min_us,
idata->ic.postsleep_max_us are user controlled. If the min
and max values are set such as max < min, then operation in
the function do_usleep_range will overflow. For avoiding this,
put a condition for checking max < min. If the condition is
true, then print the error message with respective values and
return error.

Change-Id: Iaf966d19275741a666d2dae1f0c32b72ab0642eb
Signed-off-by: default avatarSiba Prasad <sibap@codeaurora.org>
parent 8368c0e9
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