OSDN Git Service

Fix a NULL-pointer crash
authorPavlin Radoslavov <pavlin@google.com>
Wed, 29 Jul 2015 23:52:47 +0000 (16:52 -0700)
committerPavlin Radoslavov <pavlin@google.com>
Thu, 30 Jul 2015 00:00:23 +0000 (17:00 -0700)
commitefa5991fc7dc3b9b74b73966a4bf5cd5aad9f06a
tree5af379a3605a4116561b960bd94d91075c5529fb
parent48a4b9cd18a306a45249898008c73f80fb3b9d48
Fix a NULL-pointer crash

It seems that the current implementation of btm_sec_encrypt_change()
does not handle the case when it is called with an invalid handle,
such as inside file btu_hcif.c :

  case HCI_SET_CONN_ENCRYPTION:
    /* Device refused to start encryption. ... */
    btm_sec_encrypt_change(BTM_INVALID_HCI_HANDLE, ...)

Bug: 22791224

Change-Id: Ide9404d0c82819399cf258ae3f90c25b352f1e20
stack/btm/btm_sec.c