Loading system/service/gatt_server.cc +7 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <base/logging.h> #include "osi/include/log.h" #include "service/logging_helpers.h" #include "stack/include/bt_types.h" Loading Loading @@ -118,6 +119,12 @@ bool GattServer::SendResponse(const std::string& device_address, int request_id, return false; } if (offset < 0) { android_errorWriteLog(0x534e4554, "143231677"); LOG(ERROR) << "Offset is less than 0 offset: " << offset; return false; } if (value.size() + offset > BTGATT_MAX_ATTR_LEN) { LOG(ERROR) << "Value is too large"; return false; Loading system/stack/a2dp/a2dp_aac_decoder.cc +2 −2 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ typedef struct { HANDLE_AACDECODER aac_handle; bool has_aac_handle; // True if aac_handle is valid INT_PCM* decode_buf; INT_PCM* decode_buf = nullptr; decoded_data_callback_t decode_callback; } tA2DP_AAC_DECODER_CB; Loading Loading @@ -58,7 +58,7 @@ bool a2dp_aac_decoder_init(decoded_data_callback_t decode_callback) { void a2dp_aac_decoder_cleanup(void) { if (a2dp_aac_decoder_cb.has_aac_handle) aacDecoder_Close(a2dp_aac_decoder_cb.aac_handle); free(a2dp_aac_decoder_cb.decode_buf); osi_free(a2dp_aac_decoder_cb.decode_buf); memset(&a2dp_aac_decoder_cb, 0, sizeof(a2dp_aac_decoder_cb)); } Loading Loading
system/service/gatt_server.cc +7 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <base/logging.h> #include "osi/include/log.h" #include "service/logging_helpers.h" #include "stack/include/bt_types.h" Loading Loading @@ -118,6 +119,12 @@ bool GattServer::SendResponse(const std::string& device_address, int request_id, return false; } if (offset < 0) { android_errorWriteLog(0x534e4554, "143231677"); LOG(ERROR) << "Offset is less than 0 offset: " << offset; return false; } if (value.size() + offset > BTGATT_MAX_ATTR_LEN) { LOG(ERROR) << "Value is too large"; return false; Loading
system/stack/a2dp/a2dp_aac_decoder.cc +2 −2 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ typedef struct { HANDLE_AACDECODER aac_handle; bool has_aac_handle; // True if aac_handle is valid INT_PCM* decode_buf; INT_PCM* decode_buf = nullptr; decoded_data_callback_t decode_callback; } tA2DP_AAC_DECODER_CB; Loading Loading @@ -58,7 +58,7 @@ bool a2dp_aac_decoder_init(decoded_data_callback_t decode_callback) { void a2dp_aac_decoder_cleanup(void) { if (a2dp_aac_decoder_cb.has_aac_handle) aacDecoder_Close(a2dp_aac_decoder_cb.aac_handle); free(a2dp_aac_decoder_cb.decode_buf); osi_free(a2dp_aac_decoder_cb.decode_buf); memset(&a2dp_aac_decoder_cb, 0, sizeof(a2dp_aac_decoder_cb)); } Loading