qcacld-3.0: Add NULL sanity check for HTC_HANDLE
qcacld-2.0 to qcacld-3.0 propagation System crash happened due to accessing NULL pointer in HTCSendPkt. so added null sanity check to prevent this scenario. Change-Id: I4c07840eb176847c4a66efc42cd810213e1369b0 CRs-Fixed: 838998
This commit is contained in:
@@ -1221,6 +1221,10 @@ A_STATUS htc_send_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket)
|
|||||||
{
|
{
|
||||||
HTC_PACKET_QUEUE queue;
|
HTC_PACKET_QUEUE queue;
|
||||||
|
|
||||||
|
if (HTCHandle == NULL || pPacket == NULL) {
|
||||||
|
return A_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,
|
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,
|
||||||
("+-htc_send_pkt: Enter endPointId: %d, buffer: %p, length: %d \n",
|
("+-htc_send_pkt: Enter endPointId: %d, buffer: %p, length: %d \n",
|
||||||
pPacket->Endpoint, pPacket->pBuffer,
|
pPacket->Endpoint, pPacket->pBuffer,
|
||||||
|
Reference in New Issue
Block a user