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

Commit 862fb67c authored by Ajay Panicker's avatar Ajay Panicker Committed by Jack He
Browse files

Increase size of written bytes for snprintf for AT+BIND

snprintf includes the null terminator for size of string to write to buffer.
Having a buffer size of one would only write a null terminator.

Bug: 35348420
Test: HFP Test with carkit
Change-Id: Id81abca562259371520b891e84ec76f6cb434b0c
parent 3ada3422
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -708,7 +708,7 @@ static void bta_ag_bind_response(tBTA_AG_SCB* p_scb, uint8_t arg_type) {
      if (bta_ag_local_hf_ind_cfg[i + 1].is_supported) {
        /* Add ',' from second indicator */
        if (index > 1) buffer[index++] = ',';
        snprintf(&buffer[index++], 1, "%d",
        snprintf(&buffer[index++], 2, "%d",
                 bta_ag_local_hf_ind_cfg[i + 1].ind_id);
      }
    }