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

Skip to content
Commit ff36558a authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa
Browse files

USB: u_qdss: Fix bug in memory allocation for sps memory buffer



Currently qdss driver is allocating size of pointer i.e 4 bytes
for sps memory buffer instead of size of sps_mem_buf structure. This
results in accessing memory not allocated for this structure, when its
members are accessed and modified. It could result in memory corruption.
Hence allocated required memory size for sps_mem_buf structure to avoid
this issue.

Also change the data type of variable from unsigned to int as checking
unsigned variable less than zero is wrong.

CRs-Fixed: 550211
Change-Id: I2649876deb7c8375dd6a04bda192c1272998e86c
Signed-off-by: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
parent 8eb2da0f
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