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

Commit 674a59bc authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

fg-util: fix a possible buffer overflow



If the string passed is of a huge size, then bytes_read can be
higher and can overflow "pos" to a small value. This can cause
a potential buffer overflow when "pos" is used again in sscanf.
Fix this by validating bytes_read before it is used.

CRs-Fixed: 1077693
Change-Id: I59d4472b49b67f481992867a34e6779a4589d035
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent e6574109
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