Loading system/stack/avrc/avrc_pars_ct.cc +9 −4 Original line number Diff line number Diff line Loading @@ -502,7 +502,6 @@ static tAVRC_STS avrc_ctrl_pars_vendor_rsp(tAVRC_MSG_VENDOR* p_msg, } break; case AVRC_PDU_GET_PLAYER_APP_ATTR_TEXT: { tAVRC_APP_SETTING_TEXT* p_setting_text; uint8_t num_attrs; if (len == 0) { Loading @@ -510,10 +509,14 @@ static tAVRC_STS avrc_ctrl_pars_vendor_rsp(tAVRC_MSG_VENDOR* p_msg, break; } BE_STREAM_TO_UINT8(num_attrs, p); if (num_attrs > AVRC_MAX_APP_ATTR_SIZE) { num_attrs = AVRC_MAX_APP_ATTR_SIZE; } AVRC_TRACE_DEBUG("%s attr count = %d ", __func__, p_result->get_app_attr_txt.num_attr); p_result->get_app_attr_txt.num_attr = num_attrs; p_setting_text = (tAVRC_APP_SETTING_TEXT*)osi_malloc( p_result->get_app_attr_txt.p_attrs = (tAVRC_APP_SETTING_TEXT*)osi_malloc( num_attrs * sizeof(tAVRC_APP_SETTING_TEXT)); for (int xx = 0; xx < num_attrs; xx++) { BE_STREAM_TO_UINT8(p_result->get_app_attr_txt.p_attrs[xx].attr_id, p); Loading @@ -533,7 +536,6 @@ static tAVRC_STS avrc_ctrl_pars_vendor_rsp(tAVRC_MSG_VENDOR* p_msg, } break; case AVRC_PDU_GET_PLAYER_APP_VALUE_TEXT: { tAVRC_APP_SETTING_TEXT* p_setting_text; uint8_t num_vals; if (len == 0) { Loading @@ -541,11 +543,14 @@ static tAVRC_STS avrc_ctrl_pars_vendor_rsp(tAVRC_MSG_VENDOR* p_msg, break; } BE_STREAM_TO_UINT8(num_vals, p); if (num_vals > AVRC_MAX_APP_ATTR_SIZE) { num_vals = AVRC_MAX_APP_ATTR_SIZE; } p_result->get_app_val_txt.num_attr = num_vals; AVRC_TRACE_DEBUG("%s value count = %d ", __func__, p_result->get_app_val_txt.num_attr); p_setting_text = (tAVRC_APP_SETTING_TEXT*)osi_malloc( p_result->get_app_val_txt.p_attrs = (tAVRC_APP_SETTING_TEXT*)osi_malloc( num_vals * sizeof(tAVRC_APP_SETTING_TEXT)); for (int i = 0; i < num_vals; i++) { BE_STREAM_TO_UINT8(p_result->get_app_val_txt.p_attrs[i].attr_id, p); Loading Loading
system/stack/avrc/avrc_pars_ct.cc +9 −4 Original line number Diff line number Diff line Loading @@ -502,7 +502,6 @@ static tAVRC_STS avrc_ctrl_pars_vendor_rsp(tAVRC_MSG_VENDOR* p_msg, } break; case AVRC_PDU_GET_PLAYER_APP_ATTR_TEXT: { tAVRC_APP_SETTING_TEXT* p_setting_text; uint8_t num_attrs; if (len == 0) { Loading @@ -510,10 +509,14 @@ static tAVRC_STS avrc_ctrl_pars_vendor_rsp(tAVRC_MSG_VENDOR* p_msg, break; } BE_STREAM_TO_UINT8(num_attrs, p); if (num_attrs > AVRC_MAX_APP_ATTR_SIZE) { num_attrs = AVRC_MAX_APP_ATTR_SIZE; } AVRC_TRACE_DEBUG("%s attr count = %d ", __func__, p_result->get_app_attr_txt.num_attr); p_result->get_app_attr_txt.num_attr = num_attrs; p_setting_text = (tAVRC_APP_SETTING_TEXT*)osi_malloc( p_result->get_app_attr_txt.p_attrs = (tAVRC_APP_SETTING_TEXT*)osi_malloc( num_attrs * sizeof(tAVRC_APP_SETTING_TEXT)); for (int xx = 0; xx < num_attrs; xx++) { BE_STREAM_TO_UINT8(p_result->get_app_attr_txt.p_attrs[xx].attr_id, p); Loading @@ -533,7 +536,6 @@ static tAVRC_STS avrc_ctrl_pars_vendor_rsp(tAVRC_MSG_VENDOR* p_msg, } break; case AVRC_PDU_GET_PLAYER_APP_VALUE_TEXT: { tAVRC_APP_SETTING_TEXT* p_setting_text; uint8_t num_vals; if (len == 0) { Loading @@ -541,11 +543,14 @@ static tAVRC_STS avrc_ctrl_pars_vendor_rsp(tAVRC_MSG_VENDOR* p_msg, break; } BE_STREAM_TO_UINT8(num_vals, p); if (num_vals > AVRC_MAX_APP_ATTR_SIZE) { num_vals = AVRC_MAX_APP_ATTR_SIZE; } p_result->get_app_val_txt.num_attr = num_vals; AVRC_TRACE_DEBUG("%s value count = %d ", __func__, p_result->get_app_val_txt.num_attr); p_setting_text = (tAVRC_APP_SETTING_TEXT*)osi_malloc( p_result->get_app_val_txt.p_attrs = (tAVRC_APP_SETTING_TEXT*)osi_malloc( num_vals * sizeof(tAVRC_APP_SETTING_TEXT)); for (int i = 0; i < num_vals; i++) { BE_STREAM_TO_UINT8(p_result->get_app_val_txt.p_attrs[i].attr_id, p); Loading