msm: smd_pkt: Validate the size of SMD packet on read
In a scenario where the SMD packet size is invalid(> 0x7fffffff),
when smd_pkt reads this packet the size gets rounded off to a
negative number. This causes smd_pkt to wait till entire packet is read
rather than returning -ETOOSMALL.
Validate the packet size and return error in case the size if a negative
number.
CRs-Fixed: 579605
Change-Id: I163361c86f9de4c61dfc6bb8b2ce3f918e433302
Signed-off-by:
Zaheerulla Meer <zmeer@codeaurora.org>
Loading
Please register or sign in to comment