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

Commit 51c10f3d authored by Henri Chataing's avatar Henri Chataing
Browse files

[MTK] [CONVERGENCE] [ALPS07807894] uid set null pointer crash

[Description]
uid set equal to NULL because BT off, and peer still send packet to AG

[Solution]
If set equal to NULL, return

Migration Patch: 5768049

Feature: BT HOST SW
Bug: 328842230
Fix: 328842230
Test: m com.android.btservices
Flag: EXEMPT, minor bug fix
Change-Id: Iff962ede6e21d82cbef556853bb8c7ecdc3c14e1
parent e8318d04
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ static uid_set_node_t* uid_set_find_or_create_node(uid_set_t* set, int32_t app_u
}

void uid_set_add_tx(uid_set_t* set, int32_t app_uid, uint64_t bytes) {
  if (app_uid == -1 || bytes == 0) {
  if (set == nullptr || app_uid == -1 || bytes == 0) {
    return;
  }

@@ -83,7 +83,7 @@ void uid_set_add_tx(uid_set_t* set, int32_t app_uid, uint64_t bytes) {
}

void uid_set_add_rx(uid_set_t* set, int32_t app_uid, uint64_t bytes) {
  if (app_uid == -1 || bytes == 0) {
  if (set == nullptr || app_uid == -1 || bytes == 0) {
    return;
  }