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

Skip to content
Commit aa879e3b authored by Can Chen's avatar Can Chen Committed by 陈璨
Browse files

Fix coverity scan issue: uninitialized scalar variable

[Description]
Issue type: uninitialized scalar variable

[Root Cause]
In function bta_av_rc_msg(), av.remote_rsp.len and av.remote_rsp.p_data are uninitialized if this VENDOR cmd is not implemented by peer.
While in function handle_rc_vendorunique_rsp(), p_remote_rsp->len may be greater than 0 and call osi_free_and_reset()

[Solution]
Initialize the len and p_data.
Adding code to judge this case, avoid free null pointer.

Bug: 270276349
Test: atest net_test_btif_rc pass
Test: atest net_test_stack pass

Change-Id: Ic3aa23b4e5c17147f5c2d489abb0da43aa5561ce
parent 60f87b20
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