OSDN Git Service

Fix double freeing of memory in SAP service and add null-checks.
authorGohulan Balachandran <gohulanb@quicinc.com>
Fri, 20 Oct 2017 16:37:52 +0000 (09:37 -0700)
committerNaveen Kalla <mrnaveen@google.com>
Thu, 14 Dec 2017 02:19:21 +0000 (02:19 +0000)
commit46b28ccee1c2411dd3611969a842e6d23cc7460d
tree847611370ab2f7e110ffe532f7fcaf4c469c7df1
parent3404904b580b86c9c143d1978f19ecd199e9692b
Fix double freeing of memory in SAP service and add null-checks.

The payload of a SAP request could be freed twice in certain scenarios.
Also, add null-checks to prevent dereferencing of null pointers.

Bug: 64729356
Test: Manually run the fuzz tests and ensure that there is no crash in
      rild

Change-Id: Ib7ae269fa5297d6acea267337b220b8858c82bae
libril/RilSapSocket.cpp
libril/sap_service.cpp