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

Commit a8b4bfad authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "RootCanal: Prevent abort on unknown APCF opcode" into main

parents af964829 d31c4a82
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -3141,8 +3141,18 @@ void DualModeController::LeApcf(CommandView command) {
      break;
    }
    default:
      FATAL(id_, "unknown APCF opcode {}",
      ERROR(id_, "unknown APCF opcode {:#x}",
            static_cast<uint8_t>(command_view.GetApcfOpcode()));

      send_event_(bluetooth::hci::LeApcfCompleteBuilder::Create(
          kNumCommandPackets, ErrorCode::INVALID_HCI_COMMAND_PARAMETERS,
          command_view.GetApcfOpcode(), std::vector<uint8_t>{}));

      invalid_packet_handler_(
          id_, InvalidPacketReason::kUnsupported,
          fmt::format("unsupported APCF opcode {:#x}",
                      static_cast<uint8_t>(command_view.GetApcfOpcode())),
          command_view.bytes().bytes());
  }
}